gcc/testsuite/gcc.c-torture/execute/pr64718.c
raw| 1 | static int __attribute__ ((noinline, noclone)) |
| 2 | swap (int x) |
| 3 | { |
| 4 | return (unsigned short) ((unsigned short) x << 8 | (unsigned short) x >> 8); |
| 5 | } |
| 6 | |
| 7 | static int a = 0x1234; |
| 8 | |
| 9 | int |
| 10 | main (void) |
| 11 | { |
| 12 | int b = 0x1234; |
| 13 | if (swap (a) != 0x3412) |
| 14 | __builtin_abort (); |
| 15 | if (swap (b) != 0x3412) |
| 16 | __builtin_abort (); |
| 17 | return 0; |
| 18 | } |