diff mbox series

[Ada] Fix typo in checks for implementation defined units

Message ID 20201216131535.GA69960@adacore.com
State New
Headers show
Series [Ada] Fix typo in checks for implementation defined units | expand

Commit Message

Pierre-Marie de Rodat Dec. 16, 2020, 1:15 p.m. UTC
Fix mismatch in iterating over a range for Ada 2012 and referencing an
array for Ada 95. This didn't affect the behaviour, because the
referenced boolean flags in both arrays were the same for the iterated
subrange.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* impunit.adb (Not_Impl_Defined_Unit): Fix typo in iteration
	over Non_Imp_File_Names_12 array.
diff mbox series

Patch

diff --git a/gcc/ada/impunit.adb b/gcc/ada/impunit.adb
--- a/gcc/ada/impunit.adb
+++ b/gcc/ada/impunit.adb
@@ -999,7 +999,7 @@  package body Impunit is
 
       for J in Non_Imp_File_Names_12'Range loop
          if Name_Buffer (1 .. 8) = Non_Imp_File_Names_12 (J).Fname then
-            return Non_Imp_File_Names_95 (J).RMdef
+            return Non_Imp_File_Names_12 (J).RMdef
               and then Ada_Version >= Ada_2012;
          end if;
       end loop;