blob: a40692e6e3d73ed194f5f527f3740d91144d4010 [file] [log] [blame]
/* { dg-do compile { target *-*-linux* } } */
/* { dg-options "-O2 -fpic -mdirect-extern-access" } */
/* Weak common symbol with -fpic. */
__attribute__((weak, visibility("protected"),nodirect_extern_access))
int xxx;
int
foo ()
{
return xxx;
}
/* { dg-final { scan-assembler "xxx\\(%rip\\)" { target { ! ia32 } } } } */
/* { dg-final { scan-assembler-not "xxx@GOTPCREL" { target { ! ia32 } } } } */
/* { dg-final { scan-assembler "xxx@GOTOFF" { target ia32 } } } */
/* { dg-final { scan-assembler-not "xxx@GOT\\(" { target ia32 } } } */
/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */