Corrected date in changelog
[official-gcc.git] / gcc / testsuite / gnat.dg / noreturn2.adb
blob5caf222f29bc55ec5d294cc0e8b2d33144dcef7c
1 -- { dg-do compile }
3 package body Noreturn2 is
5 procedure Raise_Exception_No_Defer (Message : String);
6 pragma No_Return (Raise_Exception_No_Defer);
8 procedure Raise_From (X : Exception_Occurrence) is
9 Occurrence_Message : constant String := Exception_Message (X);
10 begin
11 if Occurrence_Message = "$" then
12 Raise_Exception_No_Defer (Occurrence_Message);
13 else
14 Raise_Exception_No_Defer ("::" & Occurrence_Message);
15 end if;
16 end;
18 procedure Raise_Exception_No_Defer (Message : String) is
19 begin
20 raise Program_Error;
21 end;
23 end Noreturn2;