PR debug/66535
[official-gcc.git] / gcc / testsuite / gnat.dg / noreturn5.adb
blob59b05da92feee1e2baa7981a4334f2cd3c12762f
1 -- { dg-do compile }
3 with Ada.Characters.Handling; use Ada.Characters.Handling;
4 with GNAT.OS_Lib; use GNAT.OS_Lib;
5 with Text_IO; use Text_IO;
7 package body Noreturn5 is
9 procedure Proc (Arg_Line : Wide_String; Keep_Going : Boolean) is
10 begin
11 Put (To_String (Arg_Line));
13 if Keep_Going then
14 raise Constraint_Error;
15 else
16 OS_Exit (1);
17 end if;
19 exception
20 when Constraint_Error =>
21 raise;
23 when others =>
24 if Keep_Going then
25 raise Constraint_Error;
26 else
27 OS_Exit (1);
28 end if;
30 end;
32 end Noreturn5;