Debian Codegraph @

gcc/testsuite/g++.dg/torture/pr38745.C

raw
1 /* { dg-do compile } */
2
3 union u_u16
4 {
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
12 {
13 unsigned int v;
14 struct
15 {
16 u_u16 lo16, hi16;
17 } u;
18 } __attribute__ ((__may_alias__));
19 union u_u64
20 {
21 struct
22 {
23 u_u32 lo32, hi32;
24 } u;
25 };
26 struct Record
27 {
28 };
29 long long
30 UnpackFullKey (Record & rec, const char *&p)
31 {
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;
35 }
36