| 1 |
/* PR libgcc/114327 */ |
| 2 |
/* { dg-do run { target bitint } } */ |
| 3 |
/* { dg-options "-std=c23" } */ |
| 4 |
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ |
| 5 |
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ |
| 6 |
|
| 7 |
#if __BITINT_MAXWIDTH__ >= 256 |
| 8 |
_BitInt(256) |
| 9 |
foo (_BitInt(256) b, _BitInt(256) c) |
| 10 |
{ |
| 11 |
return b % c; |
| 12 |
} |
| 13 |
|
| 14 |
_BitInt(256) |
| 15 |
bar (_BitInt(256) b, _BitInt(256) c) |
| 16 |
{ |
| 17 |
return b / c; |
| 18 |
} |
| 19 |
#endif |
| 20 |
|
| 21 |
int |
| 22 |
main () |
| 23 |
{ |
| 24 |
#if __BITINT_MAXWIDTH__ >= 256 |
| 25 |
if (foo (-0x9e9b9fe60wb, 1wb)) |
| 26 |
__builtin_abort (); |
| 27 |
if (bar (1wb, -0x9e9b9fe60wb)) |
| 28 |
__builtin_abort (); |
| 29 |
#endif |
| 30 |
} |