Handle symbol visibility/locality for PIE/PIC
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr32219-5.c
blobee7442eb8035c6c0a7ff2cadd9d9f4f4c4c5d6ce
1 /* { dg-do compile { target *-*-linux* } } */
2 /* { dg-options "-O2 -fpie" } */
4 /* Initialized symbol with -fpie. */
5 int xxx = -1;
7 int
8 foo ()
10 return xxx;
13 /* { dg-final { scan-assembler "movl\[ \t\]xxx\\(%rip\\), %eax" { target { ! ia32 } } } } */
14 /* { dg-final { scan-assembler-not "xxx@GOTPCREL" { target { ! ia32 } } } } */
15 /* { dg-final { scan-assembler "movl\[ \t\]xxx@GOTOFF\\(%\[^,\]*\\), %eax" { target ia32 } } } */
16 /* { dg-final { scan-assembler-not "movl\[ \t\]xxx@GOT\\(%\[^,\]*\\), %eax" { target ia32 } } } */