2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr46130-2.c
blob991e5dd18353e7717dba5fcafd5a69f3eb62b018
1 /* PR tree-optimization/46130 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fno-tree-dce" } */
5 extern int bar (int);
7 static int foo (int x)
9 int z, w;
10 if (x <= 1024)
12 z = 16;
13 w = 17;
15 else
17 bar (bar (bar (bar (bar (bar (bar (bar (bar (16)))))))));
18 if (x > 131072)
19 w = 19;
20 else
21 w = 21;
22 z = 32;
24 w = w + 121;
25 return z;
28 int
29 baz (int x)
31 return foo (x + 6) + foo (x + 15) + foo (x + 24);