modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/execute/pr52760.c (about) 1 /* PR tree-optimization/52760 */ 2 3 struct T { unsigned short a, b, c, d; }; 4 5 __attribute__((noinline, noclone)) void 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 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 }