diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/no-copy-reloc-10.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/no-copy-reloc-10.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/no-copy-reloc-10.c b/gcc/testsuite/gcc.target/i386/no-copy-reloc-10.c new file mode 100644 index 00000000000..1869f46b3f3 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/no-copy-reloc-10.c @@ -0,0 +1,15 @@ +/* { dg-do compile { target *-*-linux* } } */ +/* { dg-options "-O2 -fpic -mno-copy-reloc" } */ + +extern int bar __attribute__((visibility("protected"))); + +int * +foo (void) +{ + return &bar; +} + +/* { dg-final { scan-assembler "lea\(l|q\)\[ \t\]*bar\\(%rip\\)" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler "leal\[ \t\]*bar@GOTOFF\\(" { target { ia32 && got32x_reloc } } } } */ +/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*bar@GOTPCREL" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-not "movl\[ \t\]*bar@GOT\\(" { target { ia32 && got32x_reloc } } } } */ |