gcc/cp
[official-gcc.git] / gcc / testsuite / gnat.dg / volatile9.adb
blob52b55aee23afd3983c315950112705812d7d26a0
1 -- { dg-do compile }
2 -- { dg-options "-O2 -fdump-tree-optimized" }
4 function Volatile9 return Integer is
6 type A is array (1..4) of Integer;
7 pragma Volatile_Components (A);
9 V : A := (others => 0);
11 begin
12 for J in 1 .. 10 loop
13 V(1) := V(1) + 1;
14 end loop;
16 return V(1);
17 end;
19 -- { dg-final { scan-tree-dump "goto" "optimized" } }
20 -- { dg-final { cleanup-tree-dump "optimized" } }