1 /* { dg-options "-O -fexpensive-optimizations -fno-tree-bit-ccp" } */
2 
3 __attribute__ ((noinline, noclone))
4 int
foo(unsigned short x,unsigned short y)5 foo (unsigned short x, unsigned short y)
6 {
7   int r;
8   if (__builtin_mul_overflow (x, y, &r))
9     __builtin_abort ();
10   return r;
11 }
12 
13 int
main(void)14 main (void)
15 {
16   int x = 1;
17   int y = 2;
18   if (foo (x, y) != x * y)
19     __builtin_abort ();
20   return 0;
21 }
22 
23