blob: 7a0f6d38803fed3967cb7c812f4ee478cff72fac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
-- { dg-do compile }
-- { dg-options "-O2 -gnatp -fdump-tree-optimized" }
package body Loop_Optimization6 is
procedure Foo is
begin
for I in 1 .. 1_000_000 loop
A := A + 1;
end loop;
end Foo;
procedure Bar is
begin
for J in 1 .. 1_000 loop
Foo;
end loop;
end Bar;
procedure Main is
begin
Bar;
end;
end Loop_Optimization6;
-- { dg-final { scan-tree-dump-not "goto" "optimized"} }
|