gcc/testsuite/gnat.dg/oconst1.ads
raw| 1 | package OCONST1 is |
| 2 | |
| 3 | type u8 is mod 2**8; |
| 4 | |
| 5 | type Base is record |
| 6 | i1 : Integer; |
| 7 | i2 : Integer; |
| 8 | i3 : Integer; |
| 9 | end Record; |
| 10 | |
| 11 | type R is record |
| 12 | u : u8; |
| 13 | b : Base; |
| 14 | end record; |
| 15 | |
| 16 | for R use record |
| 17 | u at 0 range 0 .. 7; |
| 18 | b at 1 range 0 .. 95; -- BLKmode bitfield |
| 19 | end record; |
| 20 | |
| 21 | My_R : constant R := (u=>1, b=>(2, 3, 4)); |
| 22 | |
| 23 | procedure check (arg : R); |
| 24 | |
| 25 | end; |