view gcc/testsuite/gcc.dg/pr89435.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
line wrap: on
line source

/* PR rtl-optimization/89435 */
/* { dg-do run } */
/* { dg-options "-O1 -fno-forward-propagate -fno-tree-forwprop -fno-tree-ccp" } */

unsigned short a;
unsigned int b, c, d, e, f;

int
main ()
{
#if __CHAR_BIT__ == 8 && __SIZEOF_INT__ == 4
  unsigned char g = e = __builtin_mul_overflow_p (5, 542624702, 0);
  d = __builtin_bswap64 (a);
  b = __builtin_sub_overflow ((unsigned char) -e, (unsigned int) d, &g);
  e = __builtin_mul_overflow (b, c, &a);
  f = g + e;
  if (f != 0xff)
    __builtin_abort ();
#endif
  return 0;
}