blob: 5caf222f29bc55ec5d294cc0e8b2d33144dcef7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
-- { dg-do compile }
package body Noreturn2 is
procedure Raise_Exception_No_Defer (Message : String);
pragma No_Return (Raise_Exception_No_Defer);
procedure Raise_From (X : Exception_Occurrence) is
Occurrence_Message : constant String := Exception_Message (X);
begin
if Occurrence_Message = "$" then
Raise_Exception_No_Defer (Occurrence_Message);
else
Raise_Exception_No_Defer ("::" & Occurrence_Message);
end if;
end;
procedure Raise_Exception_No_Defer (Message : String) is
begin
raise Program_Error;
end;
end Noreturn2;
|