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 --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;


Reply via email to