PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr65215-4.c
blob8044d123ae029b571d3093551bcea7abca51e45c
1 /* PR tree-optimization/65215 */
3 struct S { unsigned long long l1 : 48; };
5 static inline unsigned int
6 foo (unsigned int x)
8 return (x >> 24) | ((x >> 8) & 0xff00) | ((x << 8) & 0xff0000) | (x << 24);
11 __attribute__((noinline, noclone)) unsigned int
12 bar (struct S *x)
14 return foo (x->l1);
17 int
18 main ()
20 if (__CHAR_BIT__ != 8 || sizeof (unsigned int) != 4 || sizeof (unsigned long long) != 8)
21 return 0;
22 struct S s;
23 s.l1 = foo (0xdeadbeefU) | (0xfeedULL << 32);
24 if (bar (&s) != 0xdeadbeefU)
25 __builtin_abort ();
26 return 0;