| 1 |
-- { dg-do compile } |
| 2 |
|
| 3 |
procedure Unaligned_Rep_Clause is |
| 4 |
|
| 5 |
type One_Bit_Record is |
| 6 |
record |
| 7 |
B : Boolean; |
| 8 |
end record; |
| 9 |
Pragma Pack(One_Bit_Record); |
| 10 |
|
| 11 |
subtype Version_Number_Type is String (1 .. 3); |
| 12 |
|
| 13 |
type Inter is |
| 14 |
record |
| 15 |
Version : Version_Number_Type; |
| 16 |
end record; |
| 17 |
|
| 18 |
type Msg_Type is |
| 19 |
record |
| 20 |
Status : One_Bit_Record; |
| 21 |
Version : Inter; |
| 22 |
end record; |
| 23 |
|
| 24 |
for Msg_Type use |
| 25 |
record |
| 26 |
Status at 0 range 0 .. 0; |
| 27 |
Version at 0 range 1 .. 24; |
| 28 |
end record; |
| 29 |
for Msg_Type'Size use 25; |
| 30 |
|
| 31 |
Data : Msg_Type; |
| 32 |
Pragma Warnings (Off, Data); |
| 33 |
Version : Inter; |
| 34 |
|
| 35 |
begin |
| 36 |
Version := Data.Version; |
| 37 |
end; |