blob: 2d7d441bc5b65918024a1b4c5f441fcb204f16ca [file] [log] [blame]
/* { dg-options "-O -fexpensive-optimizations -fno-tree-bit-ccp" } */
__attribute__ ((noinline, noclone))
int
foo (unsigned short x, unsigned short y)
{
int r;
if (__builtin_mul_overflow (x, y, &r))
__builtin_abort ();
return r;
}
int
main (void)
{
int x = 1;
int y = 2;
if (foo (x, y) != x * y)
__builtin_abort ();
return 0;
}