1/* Check that GOTPCREL isn't used to access glob_a.  */
2/* { dg-do compile { target *-*-linux* } } */
3/* { dg-require-effective-target pie_copyreloc } */
4/* { dg-options "-O2 -fpie" } */
5
6int glob_a;
7
8int foo ()
9{
10  return glob_a;
11}
12
13/* glob_a should never be accessed with a GOTPCREL.  */
14/* { dg-final { scan-assembler-not "glob_a@GOTPCREL" { target { ! ia32 } } } } */
15