gcc/testsuite/gcc.target/aarch64/noplt_2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fpic" } */ |
| 3 | /* { dg-require-effective-target fpic } */ |
| 4 | /* { dg-skip-if "-mcmodel=large, no support for -fpic" { aarch64-*-* } { "-mcmodel=large" } { "" } } */ |
| 5 | |
| 6 | __attribute__ ((noplt)) |
| 7 | int* bar0 (void) ; |
| 8 | int* bar1 (void) ; |
| 9 | |
| 10 | int |
| 11 | foo (int a) |
| 12 | { |
| 13 | int *b0 = bar0 (); |
| 14 | int *b1 = bar1 (); |
| 15 | return b0[a] + b1[a]; |
| 16 | } |
| 17 | |
| 18 | /* { dg-final { scan-assembler-times "blr" 1 } } */ |
| 19 | /* { dg-final { scan-assembler-times "bl\t" 1 } } */ |