blob: 54a579a9e37a33ee041dc38f8671c25b5949a274 [file] [log] [blame]
/* { dg-do compile { target *-*-linux* } } */
/* { dg-options "-O2 -fno-pic -mdirect-extern-access" } */
extern void bar (void) __attribute__ ((nodirect_extern_access));
extern void *p;
void
foo (void)
{
p = &bar;
}
/* { dg-final { scan-assembler "mov\(l|q\)\[ \t\]*bar@GOTPCREL" { target { ! ia32 } } } } */
/* { dg-final { scan-assembler "movl\[ \t\]*bar@GOT," { target { ia32 && got32x_reloc } } } } */
/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ! ia32 } } } } */
/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ia32 && got32x_reloc } } } } */
/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */