aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-2.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-2.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-2.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-2.c
index ed60d0329..19cb97e88 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-2.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-2.c
@@ -1,13 +1,14 @@
-/* Test if -mno-copyrelocs does the right thing. */
-/* { dg-do compile } */
-/* { dg-options "-O2 -fpie -mno-copyrelocs" } */
+/* Check that GOTPCREL isn't used to access glob_a. */
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-require-effective-target pie_copyreloc } */
+/* { dg-options "-O2 -fpie" } */
-extern int glob_a;
+int glob_a;
int foo ()
{
return glob_a;
}
-/* glob_a should always be accessed via GOT */
-/* { dg-final { scan-assembler "glob_a\\@GOT" { target { x86_64-*-* } } } } */
+/* glob_a should never be accessed with a GOTPCREL. */
+/* { dg-final { scan-assembler-not "glob_a@GOTPCREL" { target { ! ia32 } } } } */