| 1 |
/* PR c/102989 */ |
| 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 |
#if __BITINT_MAXWIDTH__ >= 323 |
| 8 |
__attribute__((noipa)) _BitInt(323) |
| 9 |
foo (_BitInt(318) x, _BitInt(323) y) |
| 10 |
{ |
| 11 |
return x + y; |
| 12 |
} |
| 13 |
|
| 14 |
__attribute__((noipa)) _BitInt(323) |
| 15 |
bar (_BitInt(117) x, _BitInt(323) y) |
| 16 |
{ |
| 17 |
return x + y; |
| 18 |
} |
| 19 |
#endif |
| 20 |
|
| 21 |
int |
| 22 |
main () |
| 23 |
{ |
| 24 |
#if __BITINT_MAXWIDTH__ >= 323 |
| 25 |
if (foo (-27733041854193447641086572824547940096595738628642819753407953445763239714154199953745005898992wb, |
| 26 |
4767458710334760668834645815738583537909191474644120198636728988961922824468904018596948147773722wb) |
| 27 |
!= 4739725668480567221193559242914035597812595736015477378883321035516159584754749818643203141874730wb |
| 28 |
|| (foo (22167179033351019542845489620035412963406090796537167425591583962059414367893933412196721063711wb, |
| 29 |
5235750662037407195417484618645691209305675673195256409842928988743249911043551311451335001624960wb) |
| 30 |
!= 5257917841070758214960330108265726622269081763991793577268520572705309325411445244863531722688671wb)) |
| 31 |
__builtin_abort (); |
| 32 |
if (bar (-12653567664155974398995022748067044wb, |
| 33 |
7190977642064159111525225823679712940862545424809645152399787447341776579576645887978584020321431wb) |
| 34 |
!= 7190977642064159111525225823679712940862545424809645152399787434688208915420671488983561272254387wb |
| 35 |
|| (bar (30518211833575333685611432934770228wb, |
| 36 |
2152360419596992042662178082767272400451689654640037233902067223067458441134717528282349099466966wb) |
| 37 |
!= 2152360419596992042662178082767272400451689654640037233902067253585670274710051213893782034237194wb)) |
| 38 |
__builtin_abort (); |
| 39 |
#endif |
| 40 |
} |