gcc/testsuite/gcc.dg/torture/pr47281.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-additional-options "-std=gnu17" } */ |
| 3 | |
| 4 | struct T; |
| 5 | typedef void F(void); |
| 6 | |
| 7 | F* aux(void (*x)()) |
| 8 | { |
| 9 | return x; |
| 10 | } |
| 11 | |
| 12 | void make_mess (int); |
| 13 | |
| 14 | F* |
| 15 | get_funloc (void (*x)(int), F* (*y)()) |
| 16 | { |
| 17 | return y(x); |
| 18 | } |
| 19 | |
| 20 | F* |
| 21 | foo () |
| 22 | { |
| 23 | return get_funloc (make_mess, aux); |
| 24 | } |