gcc/testsuite/gcc.dg/pr101403.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-options "-O2" } */ |
| 3 | unsigned int foo (unsigned int a) |
| 4 | { |
| 5 | unsigned int u = 0; |
| 6 | unsigned short b = __builtin_bswap16 (a); |
| 7 | return b >> (u, 12); |
| 8 | } |
| 9 | |
| 10 | int main (void) |
| 11 | { |
| 12 | unsigned int x = foo (0x80); |
| 13 | if (x != 0x0008) |
| 14 | __builtin_abort (); |
| 15 | return 0; |
| 16 | } |
| 17 |