Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/pr98727.c

raw
1 /* PR tree-optimization/98727 */
2
3 __attribute__((noipa)) long int
4 foo (long int x, long int y)
5 {
6 long int z = (unsigned long) x * y;
7 if (x != z / y)
8 return -1;
9 return z;
10 }
11
12 int
13 main ()
14 {
15 if (foo (4, 24) != 96
16 || foo (124, 126) != 124L * 126
17 || foo (__LONG_MAX__ / 16, 17) != -1)
18 __builtin_abort ();
19 return 0;
20 }