libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr96239.c
bloba099fd9ec6ffe1b9acb805ac4297de271edc2356
1 /* PR tree-optimization/96239 */
2 /* { dg-do compile { target { ilp32 || lp64 } } } */
3 /* { dg-options "-O3 -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump " r>> 8;" "optimized" { target bswap } } } */
6 union U { unsigned char c[2]; unsigned short s; };
8 unsigned short
9 foo (unsigned short x)
11 union U u;
12 u.s = x;
13 unsigned char v = u.c[0];
14 unsigned char w = u.c[1];
15 u.c[0] = w;
16 u.c[1] = v;
17 return u.s;