aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/loop_optimization14.adb
blob: c53c4840a71af1747e26f9752a5076d32f87705e (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
26
27
28
29
-- PR middle-end/55321
-- { dg-do compile }
-- { dg-options "-O" }

with Loop_Optimization14_Pkg; use Loop_Optimization14_Pkg;

package body Loop_Optimization14 is

   procedure Finalize_Pool (Pool : in out Rec) is
      Raised : Boolean := False;
   begin
      Pool.A := True;

      while not Pool.B loop

         begin
            Proc (Pool.B);

         exception
            when others =>
               if not Raised then
                  Raised := True;
               end if;
         end;
      end loop;

   end;

end Loop_Optimization14;