* snames.ads-tmpl (Name_Ivdep): New pragma-related name.
[official-gcc.git] / gcc / testsuite / gnat.dg / volatile8.adb
blob83f7488580e2bc17edb66419d263b9f12260a279
1 -- { dg-do compile }
2 -- { dg-options "-O2 -fdump-tree-optimized" }
4 function Volatile8 return Integer is
6 type Vol is new Integer;
7 pragma Volatile (Vol);
9 type A is array (1..4) of Vol;
11 V : A := (others => 0);
13 begin
14 for J in 1 .. 10 loop
15 V(1) := V(1) + 1;
16 end loop;
18 return Integer (V(1));
19 end;
21 -- { dg-final { scan-tree-dump "goto" "optimized" } }
22 -- { dg-final { cleanup-tree-dump "optimized" } }