gcc/testsuite/gcc.dg/bitint-54.c
raw| 1 | /* PR tree-optimization/113003 */ |
| 2 | /* { dg-do compile { target bitint } } */ |
| 3 | /* { dg-options "-std=c23 -O2" } */ |
| 4 | |
| 5 | #if __BITINT_MAXWIDTH__ >= 131 |
| 6 | int |
| 7 | foo (_BitInt(7) x) |
| 8 | { |
| 9 | return __builtin_mul_overflow_p (x, 1046555807606105294475452482332716433408wb, 0); |
| 10 | } |
| 11 | |
| 12 | #ifdef __SIZEOF_INT128__ |
| 13 | int |
| 14 | bar (unsigned __int128 x) |
| 15 | { |
| 16 | return __builtin_sub_overflow_p (340282366920938463463374607431768211457uwb, x, 0); |
| 17 | } |
| 18 | #endif |
| 19 | #else |
| 20 | int i; |
| 21 | #endif |