view gcc/testsuite/gcc.dg/pr83424.c @ 131:84e7813d76e9

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

/* PR rtl-optimization/83424 */
/* { dg-do run { target int128 } } */
/* { dg-options "-O -fno-tree-ccp -fno-tree-coalesce-vars" } */

typedef unsigned char u8;
typedef unsigned int u32;
typedef unsigned __int128 u128;

u32 a, c;
u8 b;

static u128 __attribute__ ((noinline, noclone))
foo (u128 p)
{
  u8 x = ~b;
  p &= c;
  x *= -p;
  x &= a == 0;
  x >>= 1;
  return p + x;
}

int
main (void)
{
  u128 x = foo (0);
  if (x != 0)
    __builtin_abort ();
  return 0;
}