gcc/testsuite/gnat.dg/discr1.ads
raw| 1 | package discr1 is |
| 2 | |
| 3 | type R is (One, Two); |
| 4 | |
| 5 | type C_Type (Kind : R) is |
| 6 | record |
| 7 | case Kind is |
| 8 | when One => |
| 9 | Name : Integer; |
| 10 | when Two => |
| 11 | Designator : String (1 .. 40); |
| 12 | end case; |
| 13 | end record; |
| 14 | |
| 15 | for C_Type use record |
| 16 | Name at 0 range 0.. 31; |
| 17 | Designator at 0 range 0..319; |
| 18 | Kind at 40 range 0.. 7; |
| 19 | end record; |
| 20 | |
| 21 | for C_Type'Size use 44 * 8; |
| 22 | |
| 23 | procedure Assign (Id : String); |
| 24 | |
| 25 | end discr1; |