view gcc/testsuite/gcc.dg/torture/pr69546-1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* PR tree-optimization/69546 */
/* { dg-do run { target int128 } } */

unsigned __int128 __attribute__ ((noinline, noclone))
foo (unsigned long long x)
{
  unsigned __int128 y = ~0ULL;
  x >>= 63;
  return y / (x | 1);
}

unsigned __int128 __attribute__ ((noinline, noclone))
bar (unsigned long long x)
{
  unsigned __int128 y = ~33ULL;
  x >>= 63;
  return y / (x | 1);
}

int
main ()
{
  if (foo (1) != ~0ULL || bar (17) != ~33ULL)
    __builtin_abort ();
  return 0;
}