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