gcc/testsuite/gnat.dg/specs/pack6.ads
raw| 1 | -- { dg-do compile } |
| 2 | |
| 3 | with Ada.Finalization; |
| 4 | with Pack6_Pkg; |
| 5 | |
| 6 | package Pack6 is |
| 7 | |
| 8 | package Eight_Bits is new Pack6_Pkg (8); |
| 9 | |
| 10 | type Some_Data is record |
| 11 | Byte_1 : Eight_Bits.Object; |
| 12 | Byte_2 : Eight_Bits.Object; |
| 13 | end record; |
| 14 | |
| 15 | for Some_Data use record |
| 16 | Byte_1 at 0 range 0 .. 7; |
| 17 | Byte_2 at 1 range 0 .. 7; |
| 18 | end record; |
| 19 | |
| 20 | type Top_Object is new Ada.Finalization.Controlled with record |
| 21 | Data : Some_Data; |
| 22 | end record; |
| 23 | |
| 24 | end Pack6; |