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