Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/pr30314.c

raw
1 /* PR middle-end/30314 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump-not "\.MUL_OVERFLOW " "optimized" } } */
5 /* { dg-final { scan-tree-dump " > 122713351" "optimized" { target int32 } } } */
6 /* { dg-final { scan-tree-dump " > 527049830677415760" "optimized" { target lp64 } } } */
7 /* { dg-final { scan-tree-dump " > 102261126" "optimized" { target int32 } } } */
8 /* { dg-final { scan-tree-dump " > 439208192231179800" "optimized" { target lp64 } } } */
9
10 __attribute__((noipa)) int
11 foo (unsigned int x)
12 {
13 return __builtin_mul_overflow_p (x, 35U, 0U);
14 }
15
16 __attribute__((noipa)) int
17 bar (unsigned long int x)
18 {
19 return __builtin_mul_overflow_p (x, 35UL, 0UL);
20 }
21
22 __attribute__((noipa)) int
23 baz (unsigned int x)
24 {
25 return __builtin_mul_overflow_p (42, x, 0U);
26 }
27
28 __attribute__((noipa)) int
29 qux (unsigned long int x)
30 {
31 return __builtin_mul_overflow_p (42, x, 0UL);
32 }