aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/bitint-13.c
blob: 004eaec74ced00403487f66c5f2b1902760ff659 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
/* { dg-options "-O2 -std=c23 -pedantic-errors" } */

#if __BITINT_MAXWIDTH__ >= 315
_Bool
foo (_BitInt (315) a, _BitInt (315) b, unsigned *c)
{
  if (a < -8 || a > 7)
    __builtin_unreachable ();
  if (b < 0 || b > 63)
    __builtin_unreachable ();
  return __builtin_add_overflow (a, b, c);
}
#else
int i;
#endif