2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pie-copyrelocs-2.c
blob19cb97e882c69e0c079ccaa381f0ca04e5b382a5
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" } */
6 int glob_a;
8 int foo ()
10 return glob_a;
13 /* glob_a should never be accessed with a GOTPCREL. */
14 /* { dg-final { scan-assembler-not "glob_a@GOTPCREL" { target { ! ia32 } } } } */