Rebase.
[official-gcc.git] / gcc / testsuite / gnat.dg / opt35.adb
blobb0defe07ca6ab0b8d34f2e80c8abc7d57a70534f
1 -- { dg-do run }
2 -- { dg-options "-O" }
4 with Opt35_Pkg; use Opt35_Pkg;
6 procedure Opt35 is
7 I : Integer := -1;
8 N : Natural := 0;
9 begin
10 begin
11 I := F(0);
12 exception
13 when E => N := N + 1;
14 end;
16 begin
17 I := I + F(0);
18 exception
19 when E => N := N + 1;
20 end;
22 if N /= 2 or I = 0 then
23 raise Program_Error;
24 end if;
25 end;