aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/opt22.adb
blob: 6ea2440e97017984101b825bf08f29fe1a6ea594 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-- { dg-do run }
-- { dg-options "-O" }

with Opt22_Pkg; use Opt22_Pkg;

procedure Opt22 is

   procedure Go (S : String) is
   begin
      begin
        Fail;
      exception
        when Constraint_Error => Put ("the " & S);
      end;
      Put ("the " & S);
   end;

begin
   Go ("message");
end;