gcc/testsuite/gcc.dg/bitint-126.c
raw| 1 | /* PR middle-end/121828 */ |
| 2 | /* { dg-do compile { target bitint } } */ |
| 3 | /* { dg-options "-std=c23 -O2" } */ |
| 4 | |
| 5 | void baz (int); |
| 6 | #if __BITINT_MAXWIDTH__ >= 255 |
| 7 | unsigned _BitInt(255) a; |
| 8 | |
| 9 | void |
| 10 | foo (int x, int y) |
| 11 | { |
| 12 | unsigned _BitInt(255) b; |
| 13 | int t = __builtin_sub_overflow (y, x, &b); |
| 14 | baz (t); |
| 15 | a = b; |
| 16 | } |
| 17 | |
| 18 | void |
| 19 | bar (int x, int y) |
| 20 | { |
| 21 | unsigned _BitInt(255) b; |
| 22 | bool t = __builtin_sub_overflow (y, x, &b); |
| 23 | a = b; |
| 24 | baz (t); |
| 25 | } |
| 26 | #endif |