(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr83424.c
       1  /* PR rtl-optimization/83424 */
       2  /* { dg-do run { target int128 } } */
       3  /* { dg-options "-O -fno-tree-ccp -fno-tree-coalesce-vars" } */
       4  
       5  typedef unsigned char u8;
       6  typedef unsigned int u32;
       7  typedef unsigned __int128 u128;
       8  
       9  u32 a, c;
      10  u8 b;
      11  
      12  static u128 __attribute__ ((noinline, noclone))
      13  foo (u128 p)
      14  {
      15    u8 x = ~b;
      16    p &= c;
      17    x *= -p;
      18    x &= a == 0;
      19    x >>= 1;
      20    return p + x;
      21  }
      22  
      23  int
      24  main (void)
      25  {
      26    u128 x = foo (0);
      27    if (x != 0)
      28      __builtin_abort ();
      29    return 0;
      30  }