c++: prvalue of array type [PR111286]
[official-gcc.git] / gcc / testsuite / gnat.dg / nested_agg_bitfield_constructor.adb
blob6015900c5aa2185570b166906ee821f108f9f2bb
1 -- { dg-do compile }
2 -- { dg-options "-gnatws" }
3 -- (bits of "Header" unused)
5 procedure Nested_Agg_Bitfield_Constructor is
7 type Uint64 is mod 2 ** 64;
8 type Uint16 is mod 2 ** 16;
10 type Time_Stamp is record
11 Sec : Uint64;
12 Year : Uint16;
13 end record;
15 type Msg_Header is record
16 Stamp : Time_Stamp;
17 end record;
18 for Msg_Header use record
19 Stamp at 0 range 0 .. 64+16-1;
20 end record;
21 for Msg_Header'Size use 80;
23 type Msg is record
24 Header : Msg_Header;
25 end record;
27 for Msg use record
28 Header at 0 range 0 .. 191;
29 end record;
31 M : Msg := (Header => (Stamp => (2, 4)));
32 begin
33 null;
34 end;