Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr63843.c
blob9f6c7b06c391fd70ca2ce76ecccf110a537b77b8
1 /* PR rtl-optimization/63843 */
3 static inline __attribute__ ((always_inline))
4 unsigned short foo (unsigned short v)
6 return (v << 8) | (v >> 8);
9 unsigned short __attribute__ ((noinline, noclone, hot))
10 bar (unsigned char *x)
12 unsigned int a;
13 unsigned short b;
14 __builtin_memcpy (&a, &x[0], sizeof (a));
15 a ^= 0x80808080U;
16 __builtin_memcpy (&x[0], &a, sizeof (a));
17 __builtin_memcpy (&b, &x[2], sizeof (b));
18 return foo (b);
21 int
22 main ()
24 unsigned char x[8] = { 0x01, 0x01, 0x01, 0x01 };
25 if (__CHAR_BIT__ == 8
26 && sizeof (short) == 2
27 && sizeof (int) == 4
28 && bar (x) != 0x8181U)
29 __builtin_abort ();
30 return 0;