(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr83393.c
       1  /* PR rtl-optimization/83393 */
       2  /* { dg-do run } */
       3  /* { dg-options "-O2 -fno-forward-propagate -fno-tree-bit-ccp" } */
       4  
       5  typedef unsigned char u8;
       6  typedef unsigned short u16;
       7  typedef unsigned int u32;
       8  typedef unsigned long long u64;
       9  
      10  u32 a, d;
      11  u64 b;
      12  u8 c;
      13  
      14  static u64 __attribute__ ((noinline, noclone))
      15  foo (u16 f, u64 g)
      16  {
      17    f <<= 15;
      18    f *= d;
      19    f -= g %= 44;
      20    f <<= f <= g;
      21    c = 255;
      22    c >>= (u8) f == 0;
      23    f *= g;
      24    c -= ~c;
      25    return f + a + b + f;
      26  }
      27  
      28  int
      29  main (void)
      30  {
      31  #if (__SIZEOF_LONG_LONG__ == 8 && __SIZEOF_INT__ == 4 \
      32       && __SIZEOF_SHORT__ == 2 && __CHAR_BIT__ == 8)
      33    u64 x = foo (3, 0xE6C0011BBA6DBD7LL);
      34    if (x != 0x1f66e)
      35      __builtin_abort ();
      36  #endif
      37    return 0;
      38  }