aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/bitint-70.c
blob: 2d693bb5849b27eb17dea09d86ae70b9b30563a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* PR libgcc/114762 */
/* { dg-do run { target bitint } } */
/* { dg-options "-std=c23" } */
/* { dg-skip-if "" { ! run_expensive_tests }  { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */

#if __BITINT_MAXWIDTH__ >= 255
__attribute__((__noipa__)) signed _BitInt(255)
foo (signed _BitInt(255) a, signed _BitInt(65) b)
{
  return a / b;
}
#endif

int
main ()
{
#if __BITINT_MAXWIDTH__ >= 255
  if (foo (1, -0xffffffffffffffffwb - 1wb))
    __builtin_abort ();
#endif
}