gcc/testsuite/gcc.target/pru/mabi-ti-7.c
raw| 1 | /* Test TI ABI unsupported constructs */ |
| 2 | |
| 3 | /* { dg-do assemble } */ |
| 4 | /* { dg-options "-O1 -mabi=ti" } */ |
| 5 | |
| 6 | struct s1 { |
| 7 | int (*f)(void); |
| 8 | int a; |
| 9 | }; |
| 10 | |
| 11 | extern struct s1 s; |
| 12 | |
| 13 | int test1(void) |
| 14 | { |
| 15 | return s.f(); /* { dg-error "function pointers not supported with '-mabi=ti' option" } */ |
| 16 | } |
| 17 | |
| 18 | int test2(void) |
| 19 | { |
| 20 | return s.a; /* { dg-error "function pointers not supported with '-mabi=ti' option" } */ |
| 21 | } |