Debian Codegraph @

gcc/testsuite/gnat.dg/noreturn5.adb

raw
1 -- { dg-do compile }
2
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;
6
7 package body Noreturn5 is
8
9 procedure Proc (Arg_Line : Wide_String; Keep_Going : Boolean) is
10 begin
11 Put (To_String (Arg_Line));
12
13 if Keep_Going then
14 raise Constraint_Error;
15 else
16 OS_Exit (1);
17 end if;
18
19 exception
20 when Constraint_Error =>
21 raise;
22
23 when others =>
24 if Keep_Going then
25 raise Constraint_Error;
26 else
27 OS_Exit (1);
28 end if;
29
30 end;
31
32 end Noreturn5;