gcc/testsuite/gnat.dg/opt29.ads
raw| 1 | package Opt29 is |
| 2 | |
| 3 | type Word is mod 2**16; |
| 4 | |
| 5 | type PID is record |
| 6 | W1, W2: Word; |
| 7 | end record; |
| 8 | |
| 9 | type Root1 is tagged record |
| 10 | Id: PID; |
| 11 | end record; |
| 12 | type Root1_Ptr is access all Root1'Class; |
| 13 | |
| 14 | type Root2 is tagged null record; |
| 15 | type Root2_Ptr is access all Root2'class; |
| 16 | |
| 17 | type Derived2 is new Root2 with record |
| 18 | Id: PID; |
| 19 | end record; |
| 20 | |
| 21 | type Rec is record |
| 22 | F1: Root1_Ptr; |
| 23 | F2: Root2_Ptr; |
| 24 | end record; |
| 25 | |
| 26 | procedure Proc (T : Rec); |
| 27 | |
| 28 | end Opt29; |