2016-11-21 Thomas Preud'homme <thomas.preudhomme@arm.com>
[official-gcc.git] / gcc / testsuite / gnat.dg / loop_optimization14.adb
blobc53c4840a71af1747e26f9752a5076d32f87705e
1 -- PR middle-end/55321
2 -- { dg-do compile }
3 -- { dg-options "-O" }
5 with Loop_Optimization14_Pkg; use Loop_Optimization14_Pkg;
7 package body Loop_Optimization14 is
9 procedure Finalize_Pool (Pool : in out Rec) is
10 Raised : Boolean := False;
11 begin
12 Pool.A := True;
14 while not Pool.B loop
16 begin
17 Proc (Pool.B);
19 exception
20 when others =>
21 if not Raised then
22 Raised := True;
23 end if;
24 end;
25 end loop;
27 end;
29 end Loop_Optimization14;