1-- { dg-do compile } 2 3with Ada.Characters.Handling; use Ada.Characters.Handling; 4with GNAT.OS_Lib; use GNAT.OS_Lib; 5with Text_IO; use Text_IO; 6 7package 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 32end Noreturn5; 33