gcc/testsuite/gcc.target/powerpc/no-r11-3.c
raw| 1 | /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ |
| 2 | /* { dg-skip-if "" { *-*-darwin* } } */ |
| 3 | /* { dg-skip-if "" { powerpc_elfv2 } } */ |
| 4 | /* { dg-options "-O2 -mno-pointers-to-nested-functions" } */ |
| 5 | |
| 6 | extern void ext_call (int (func) (void)); |
| 7 | |
| 8 | int |
| 9 | outer_func (int init) /* { dg-error "'-mno-pointers-to-nested-functions' option" } */ |
| 10 | { |
| 11 | int value = init; |
| 12 | |
| 13 | int inner (void) |
| 14 | { |
| 15 | return ++value; |
| 16 | } |
| 17 | |
| 18 | ext_call (inner); |
| 19 | return value; |
| 20 | } |
| 21 |