diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/noplt-10.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/noplt-10.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/noplt-10.c b/gcc/testsuite/gcc.target/i386/noplt-10.c new file mode 100644 index 00000000000..a4c316bb91a --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/noplt-10.c @@ -0,0 +1,15 @@ +/* { dg-do compile { target *-*-linux* } } */ +/* { dg-options "-O2 -fno-pic -fno-plt=bar" } */ + +extern void bar (void); +extern void *p; + +void +foo (void) +{ + p = &bar; +} + +/* { dg-final { scan-assembler "mov\(l|q\)\[ \t\]*bar@GOTPCREL" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler "movl\[ \t\]*bar@GOT," { target { ia32 && r_386_got32x } } } } */ +/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { { ! ia32 } || r_386_got32x } } } } */ |