gcc/testsuite/gcc.target/aarch64/noplt_1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fpic -fno-plt" } */ |
| 3 | /* { dg-require-effective-target fpic } */ |
| 4 | /* { dg-skip-if "-mcmodel=large, no support for -fpic" { aarch64-*-* } { "-mcmodel=large" } { "" } } */ |
| 5 | |
| 6 | int* bar (void) ; |
| 7 | |
| 8 | int |
| 9 | foo (int a) |
| 10 | { |
| 11 | int *b = bar (); |
| 12 | return b[a]; |
| 13 | } |
| 14 | |
| 15 | /* { dg-final { scan-assembler "blr" } } */ |
| 16 | /* { dg-final { scan-assembler-not "bl\t" } } */ |