PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr65215-1.c
blob07b89fc8fb7e3a409b6dd78ea0691eef9982ab9f
1 /* PR tree-optimization/65215 */
3 static inline unsigned int
4 foo (unsigned int x)
6 return (x >> 24) | ((x >> 8) & 0xff00) | ((x << 8) & 0xff0000) | (x << 24);
9 __attribute__((noinline, noclone)) unsigned int
10 bar (unsigned long long *x)
12 return foo (*x);
15 int
16 main ()
18 if (__CHAR_BIT__ != 8 || sizeof (unsigned int) != 4 || sizeof (unsigned long long) != 8)
19 return 0;
20 unsigned long long l = foo (0xdeadbeefU) | 0xfeedbea800000000ULL;
21 if (bar (&l) != 0xdeadbeefU)
22 __builtin_abort ();
23 return 0;