Merged r157653 through r157895 into branch.
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr38745.C
blob4ad9d85fe3696e772d220827f215ca40f848fe46
1 /* { dg-do compile } */
3 union u_u16
5   unsigned short v;
6   struct
7     {
8       unsigned char lo8, hi8;
9     } __attribute__ ((__may_alias__)) u;
10 } __attribute__ ((__may_alias__));
11 union u_u32
13   unsigned int v;
14   struct
15     {
16       u_u16 lo16, hi16;
17     } u;
18 } __attribute__ ((__may_alias__));
19 union u_u64
21   struct
22     {
23       u_u32 lo32, hi32;
24     } u;
26 struct Record
29 long long
30 UnpackFullKey (Record & rec, const char *&p)
32   long long c64 = 0;
33   (*(u_u16 *) & (*(u_u32 *) & ( *(u_u64*)&c64).u.lo32.v).u.lo16.v).u.hi8 = 1;
34   return c64;