https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114425

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Strangely it is dependent on the printf loop, without that it works fine.

Slightly adjusted testcase:

#if __BITINT_MAXWIDTH__ >= 2000
_BitInt(8) a;
_BitInt(300) b;
_BitInt(2000) c;

unsigned
foo (_BitInt(2000) d)
{
  int o = __builtin_add_overflow_p (d, 0, b);
  _BitInt(2000) m = c * a;
  unsigned u = m;
  return u + o;
}

__attribute__((noipa)) void
bar (int x)
{
  (void) x;
}
#endif

int
main ()
{
#if __BITINT_MAXWIDTH__ >= 2000
  unsigned x = foo
(0xfa7ac16f2613255eeb217e871c1f02221e26ce11f82d6a33206ec0ad5d4414722019933c0e2wb);
  for (unsigned i = 0; i < sizeof (x); i++)
    bar (((volatile unsigned char *) &x)[i]);
  if (x != 1)
    __builtin_abort ();
#endif
}

Reply via email to