Merged trunk at revision 161680 into branch.
[official-gcc.git] / gcc / testsuite / gnat.dg / noreturn3.adb
blob4457373c308a9657976cd236814d2dc00e9e7d1f
1 -- { dg-do compile }
3 with Ada.Exceptions;
5 package body Noreturn3 is
7 procedure Raise_Error (E : Enum; ErrorMessage : String) is
9 function Msg return String is
10 begin
11 return "Error :" & ErrorMessage;
12 end;
14 begin
15 case E is
16 when One =>
17 Ada.Exceptions.Raise_Exception (Exc1'Identity, Msg);
19 when Two =>
20 Ada.Exceptions.Raise_Exception (Exc2'Identity, Msg);
22 when others =>
23 Ada.Exceptions.Raise_Exception (Exc3'Identity, Msg);
24 end case;
25 end;
27 end Noreturn3;