| 1 |
/* PR tree-optimization/113614 */ |
| 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 |
_BitInt(8) a; |
| 8 |
_BitInt(8) b; |
| 9 |
_BitInt(8) c; |
| 10 |
|
| 11 |
#if __BITINT_MAXWIDTH__ >= 256 |
| 12 |
_BitInt(256) |
| 13 |
foo (_BitInt(8) y, unsigned _BitInt(256) z) |
| 14 |
{ |
| 15 |
unsigned _BitInt(256) d = -y; |
| 16 |
z /= d; |
| 17 |
return z + a + b + c; |
| 18 |
} |
| 19 |
#endif |
| 20 |
|
| 21 |
int |
| 22 |
main () |
| 23 |
{ |
| 24 |
#if __BITINT_MAXWIDTH__ >= 256 |
| 25 |
if (foo (0xfwb, 0x24euwb)) |
| 26 |
__builtin_abort (); |
| 27 |
#endif |
| 28 |
return 0; |
| 29 |
} |