aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/loop_optimization11.adb
blob: 435d466a9c485094fadea6167f90163fa3b88e71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- { dg-do compile }
-- { dg-options "-O" }

with Loop_Optimization11_Pkg; use Loop_Optimization11_Pkg;

procedure Loop_Optimization11 is
   Arr : array (Prot, Mem) of Integer := (others => (others => 0));
begin
   Put_Line (Img (0) & " ");
   for I in Arr'Range (1) loop
      for J in Arr'Range (2) loop
         declare
            Elem : Integer renames Arr (I, J);
         begin
            Put_Line (Img (Elem));
         end;
      end loop;
   end loop;
end;