gcc/testsuite/gcc.dg/torture/bitint-76.c
raw| 1 | /* PR tree-optimization/119707 */ |
| 2 | /* { dg-do run { target bitint } } */ |
| 3 | |
| 4 | #if __BITINT_MAXWIDTH__ >= 256 |
| 5 | __attribute__((noipa)) unsigned _BitInt(256) |
| 6 | foo (unsigned _BitInt(256) x, _BitInt(129) y) |
| 7 | { |
| 8 | return x + (unsigned _BitInt(255)) y; |
| 9 | } |
| 10 | #endif |
| 11 | |
| 12 | int |
| 13 | main () |
| 14 | { |
| 15 | #if __BITINT_MAXWIDTH__ >= 256 |
| 16 | if (foo (0, -1) != 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffuwb) |
| 17 | __builtin_abort (); |
| 18 | #endif |
| 19 | } |