gcc/testsuite/gnat.dg/renaming9.ads
raw| 1 | package Renaming9 is |
| 2 | |
| 3 | pragma Elaborate_Body; |
| 4 | |
| 5 | type Object is tagged null record; |
| 6 | |
| 7 | type Pointer is access all Object'Class; |
| 8 | |
| 9 | type Derived is new Object with record |
| 10 | I : Integer; |
| 11 | end record; |
| 12 | |
| 13 | Ptr : Pointer := new Derived; |
| 14 | Obj : Derived renames Derived (Ptr.all); |
| 15 | |
| 16 | end Renaming9; |