2016-11-21 Thomas Preud'homme <thomas.preudhomme@arm.com>
[official-gcc.git] / gcc / testsuite / gnat.dg / volatile9.adb
blob088559e4e04583f831153a5790a7227af77a88e0
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" } }