| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O3" } */ |
| 3 |
|
| 4 |
typedef int (*funct)(int, int, int); |
| 5 |
|
| 6 |
extern int f(int, int, int); |
| 7 |
extern int g(int, int, int); |
| 8 |
extern int h(int, funct, funct); |
| 9 |
|
| 10 |
static int baz(int x, int y, int z) |
| 11 |
{ |
| 12 |
return x + y + z; |
| 13 |
} |
| 14 |
|
| 15 |
static int bar(int n, funct f1, funct f2) |
| 16 |
{ |
| 17 |
return h(n, f1, f2) + f1(0, 1, 2); |
| 18 |
} |
| 19 |
|
| 20 |
static int foo(int n, funct f1, funct f2) |
| 21 |
{ |
| 22 |
return bar(n, f1, f2) + f2(0, 1, 2); |
| 23 |
} |
| 24 |
|
| 25 |
int main(void) |
| 26 |
{ |
| 27 |
return foo(0, f, g) |
| 28 |
#ifndef ICE2 |
| 29 |
+ foo(0, baz, g) |
| 30 |
#endif |
| 31 |
; |
| 32 |
} |