1 /* PR tree-optimization/52760 */
2 
3 struct T { unsigned short a, b, c, d; };
4 
5 __attribute__((noinline, noclone)) void
foo(int x,struct T * y)6 foo (int x, struct T *y)
7 {
8   int i;
9 
10   for (i = 0; i < x; i++)
11     {
12       y[i].a = ((0x00ff & y[i].a >> 8) | (0xff00 & y[i].a << 8));
13       y[i].b = ((0x00ff & y[i].b >> 8) | (0xff00 & y[i].b << 8));
14       y[i].c = ((0x00ff & y[i].c >> 8) | (0xff00 & y[i].c << 8));
15       y[i].d = ((0x00ff & y[i].d >> 8) | (0xff00 & y[i].d << 8));
16     }
17 }
18 
19 int
main()20 main ()
21 {
22   struct T t = { 0x0001, 0x0203, 0x0405, 0x0607 };
23   foo (1, &t);
24   if (t.a != 0x0100 || t.b != 0x0302 || t.c != 0x0504 || t.d != 0x0706)
25     __builtin_abort ();
26   return 0;
27 }
28