aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-1.c
blob: ae339bd9e48ff048d39e542e3f7e77eb3e216645 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* Test if -mcopyrelocs does the right thing. */
/* { dg-do compile } */
/* { dg-options "-O2 -fpie -mcopyrelocs" } */

extern int glob_a;

int foo ()
{
  return glob_a;
}

/* glob_a should never be accessed with a GOTPCREL  */ 
/* { dg-final { scan-assembler-not "glob_a\\@GOTPCREL" { target { x86_64-*-* } } } } */