gcc/testsuite/gcc.target/aarch64/indirect_return-3.c
raw| 1 | /* Check that mismatching attribute on function pointers is an error. */ |
| 2 | /* { dg-do compile } */ |
| 3 | |
| 4 | void f(void); |
| 5 | void (*f_ptr)(void) __attribute__((indirect_return)) = f; /* { dg-error {incompatible pointer type} } */ |
| 6 | |
| 7 | void g(void) __attribute__((indirect_return)); |
| 8 | void (*g_ptr1)(void) = g; /* { dg-error {incompatible pointer type} } */ |
| 9 | void (*g_ptr2)(void) __attribute__((indirect_return)) = g; |