Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gnat.dg/raise_expr.adb @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 84e7813d76e9 |
children |
rev | line source |
---|---|
131 | 1 -- { dg-do compile } |
2 | |
3 procedure Raise_Expr is | |
4 | |
5 E : exception; | |
6 | |
7 type T is tagged limited null record; | |
8 type TC is new T with null record; | |
9 | |
10 function F0 return Boolean is | |
11 begin | |
12 return raise E; | |
13 end; | |
14 | |
15 function F return T'Class is | |
16 TT : T; | |
17 begin | |
18 return raise E; -- Causes compile-time crash | |
19 end F; | |
20 | |
21 begin | |
22 declare | |
23 O : T'class := F; | |
24 begin | |
25 null; | |
26 end; | |
27 end Raise_Expr; |