ubuntu-buildroot/output/build/host-gcc-initial-11.4.0/gcc/testsuite/gnat.dg/raise_expr.adb

28 lines
424 B
Ada
Raw Normal View History

2024-04-01 15:19:46 +00:00
-- { dg-do compile }
procedure Raise_Expr is
E : exception;
type T is tagged limited null record;
type TC is new T with null record;
function F0 return Boolean is
begin
return raise E;
end;
function F return T'Class is
TT : T;
begin
return raise E; -- Causes compile-time crash
end F;
begin
declare
O : T'class := F;
begin
null;
end;
end Raise_Expr;