1 /* Test -mno-pic-data-is-text-relative option. No relative addressing
2 of elements in .data and .bss are allowed with that option. */
4 /* { dg-do compile } */
5 /* { dg-options "-O3 -fno-optimize-sibling-calls -fpic -mno-pic-data-is-text-relative -march=z10 -mtune=z9-109 -mzarch" } */
9 /* With -mno-pic-data-is-text-relative these must be addressed via
12 int __attribute__((noinline
,noclone
))
18 static int __attribute__((noinline
,noclone
))
24 /* Just to make a potentially modified. */
32 /* { dg-final { scan-assembler-times "a@GOTENT" 3 } } */
34 /* The exrl target is a label_ref which should not be affected at
38 mymemcpy (char *dst
, char *src
, long size
)
40 __builtin_memcpy (dst
, src
, size
);
43 /* { dg-final { scan-assembler "exrl" } } */
46 /* PLT slots can still be addressed relatively. */
54 /* { dg-final { scan-assembler-times "foo@PLT" 1 } } */
57 /* GOT entries can still be addressed relatively. */
65 /* { dg-final { scan-assembler-times "foo@GOTENT" 1 } } */
68 /* A static function can be addressed relatively. */
83 /* { dg-final { scan-assembler-not "foostatic@" } } */