libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / pr116034.c
blob955b4c9e86b8bdbd5ce3ac8e2742de8a3b972b93
1 /* PR tree-optimization/116034 */
2 /* { dg-do run } */
3 /* { dg-options "-O1 -fno-strict-aliasing" } */
5 unsigned short int g;
7 static inline int
8 foo (_Complex unsigned short c)
10 if (__SIZEOF_SHORT__ == 2)
11 __builtin_memmove (&g, 1 + (char *) &c, 2);
12 return g;
15 int
16 main ()
18 if (__SIZEOF_SHORT__ == 2
19 && __CHAR_BIT__ == 8
20 && (foo (__BYTE_ORDER__ != __ORDER_BIG_ENDIAN__ ? 0x100 : 1)
21 != (__BYTE_ORDER__ != __ORDER_BIG_ENDIAN__ ? 1 : 0x100)))
22 __builtin_abort ();