gcc/testsuite/gcc.dg/torture/bitint-52.c
raw| 1 | /* PR middle-end/113574 */ |
| 2 | /* { dg-do run { target bitint } } */ |
| 3 | /* { dg-options "-std=c23 -pedantic-errors" } */ |
| 4 | /* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ |
| 5 | /* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ |
| 6 | |
| 7 | unsigned _BitInt(1) a; |
| 8 | unsigned _BitInt(8) b; |
| 9 | |
| 10 | void |
| 11 | foo (unsigned _BitInt(16) x) |
| 12 | { |
| 13 | a += (x << 2) | b; |
| 14 | } |
| 15 | |
| 16 | int |
| 17 | main () |
| 18 | { |
| 19 | foo (0xfef1uwb); |
| 20 | if (a) |
| 21 | __builtin_abort (); |
| 22 | return 0; |
| 23 | } |