Merge from trunk
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / pr59008.c
blobb7296724300f24c12d3777e2e7a9b42d5b9f0eba
1 /* { dg-do compile } */
2 /* { dg-options "-O3" } */
4 typedef int (*funct)(int, int, int);
6 extern int f(int, int, int);
7 extern int g(int, int, int);
8 extern int h(int, funct, funct);
10 static int baz(int x, int y, int z)
12 return x + y + z;
15 static int bar(int n, funct f1, funct f2)
17 return h(n, f1, f2) + f1(0, 1, 2);
20 static int foo(int n, funct f1, funct f2)
22 return bar(n, f1, f2) + f2(0, 1, 2);
25 int main(void)
27 return foo(0, f, g)
28 #ifndef ICE2
29 + foo(0, baz, g)
30 #endif