gcc/testsuite/gcc.dg/bitint-13.c
raw| 1 | /* PR c/102989 */ |
| 2 | /* { dg-do compile { target bitint } } */ |
| 3 | /* { dg-options "-O2 -std=c23 -pedantic-errors" } */ |
| 4 | |
| 5 | #if __BITINT_MAXWIDTH__ >= 315 |
| 6 | _Bool |
| 7 | foo (_BitInt (315) a, _BitInt (315) b, unsigned *c) |
| 8 | { |
| 9 | if (a < -8 || a > 7) |
| 10 | __builtin_unreachable (); |
| 11 | if (b < 0 || b > 63) |
| 12 | __builtin_unreachable (); |
| 13 | return __builtin_add_overflow (a, b, c); |
| 14 | } |
| 15 | #else |
| 16 | int i; |
| 17 | #endif |