1 /* PR target/54436 */
2 /* { dg-do assemble } */
3
4 #if __SIZEOF_SHORT__ == 2 && __SIZEOF_LONG_LONG__ == 8
5 static inline unsigned short
baz(unsigned short * x)6 baz (unsigned short *x)
7 {
8 union U { unsigned short a; unsigned char b[2]; } u = { *x };
9 u.b[0] = ((u.b[0] * 0x0802ULL & 0x22110ULL)
10 | (u.b[0] * 0x8020ULL & 0x88440ULL)) * 0x10101ULL >> 16;
11 u.b[1] = ((u.b[1] * 0x0802ULL & 0x22110ULL)
12 | (u.b[1] * 0x8020ULL & 0x88440ULL)) * 0x10101ULL >> 16;
13 unsigned char t = u.b[0];
14 u.b[0] = u.b[1];
15 u.b[1] = t;
16 return u.a;
17 }
18
19 static inline unsigned long long
bar(unsigned long long * x)20 bar (unsigned long long *x)
21 {
22 union U { unsigned long long a; unsigned short b[4]; } u = { *x };
23 u.b[0] = baz (&u.b[0]);
24 return u.a;
25 }
26
27 void
foo(void)28 foo (void)
29 {
30 unsigned long long l = -1ULL;
31 __asm volatile ("" : : "r" (bar (&l)));
32 }
33 #else
34 void
foo(void)35 foo (void)
36 {
37 }
38 #endif
39