RISC-V: Add support for riscv-*-*.
[official-gcc.git] / gcc / testsuite / gnat.dg / raise_expr.adb
blobcdca9064425ad4d29ea737e23f21ab70e18705d1
1 -- { dg-do compile }
3 procedure Raise_Expr is
5 E : exception;
7 type T is tagged limited null record;
8 type TC is new T with null record;
10 function F0 return Boolean is
11 begin
12 return raise E;
13 end;
15 function F return T'Class is
16 TT : T;
17 begin
18 return raise E; -- Causes compile-time crash
19 end F;
21 begin
22 declare
23 O : T'class := F;
24 begin
25 null;
26 end;
27 end Raise_Expr;