1 /* PR tree-optimization/46130 */ 2 /* { dg-do compile } */ 3 /* { dg-options "-O2 -fno-tree-dce" } */ 4 5 extern int bar (int); 6 foo(int x)7static int foo (int x) 8 { 9 int z, w; 10 if (x <= 1024) 11 { 12 z = 16; 13 w = 17; 14 } 15 else 16 { 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; 23 } 24 w = w + 121; 25 return z; 26 } 27 28 int baz(int x)29baz (int x) 30 { 31 return foo (x + 6) + foo (x + 15) + foo (x + 24); 32 } 33