aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-2.c
blob: 19cb97e882c69e0c079ccaa381f0ca04e5b382a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* 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" } */

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 { ! ia32 } } } } */