blob: f6c2d2c0d7bd8bc0c6dadc87974f51bcd822d923 [file] [log] [blame]
-- { dg-do compile }
-- { dg-options "-O2 -fdump-tree-optimized" }
function Volatile6 return Integer is
type Vol is new Integer;
pragma Volatile (Vol);
V : Vol := 0;
begin
for J in 1 .. 10 loop
V := V + 1;
end loop;
return Integer (V);
end;
-- { dg-final { scan-tree-dump "goto" "optimized" } }