| 1 |
/* PR tree-optimization/116034 */ |
| 2 |
/* { dg-do run } */ |
| 3 |
/* { dg-options "-O1 -fno-strict-aliasing" } */ |
| 4 |
|
| 5 |
unsigned short int g; |
| 6 |
|
| 7 |
static inline int |
| 8 |
foo (_Complex unsigned short c) |
| 9 |
{ |
| 10 |
if (__SIZEOF_SHORT__ == 2) |
| 11 |
__builtin_memmove (&g, 1 + (char *) &c, 2); |
| 12 |
return g; |
| 13 |
} |
| 14 |
|
| 15 |
int |
| 16 |
main () |
| 17 |
{ |
| 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 (); |
| 23 |
} |