| 1 |
/* { dg-do compile { target *-*-linux* } } */ |
| 2 |
/* { dg-options "-O2 -fno-pic -mno-direct-extern-access" } */ |
| 3 |
|
| 4 |
extern int bar; |
| 5 |
|
| 6 |
int |
| 7 |
foo (void) |
| 8 |
{ |
| 9 |
return bar; |
| 10 |
} |
| 11 |
|
| 12 |
/* { dg-final { scan-assembler "mov\(l|q\)\[ \t\]*bar@GOTPCREL" { target { ! ia32 } } } } */ |
| 13 |
/* { dg-final { scan-assembler "movl\[ \t\]*bar@GOT," { target { ia32 && got32x_reloc } } } } */ |
| 14 |
/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ! ia32 } } } } */ |
| 15 |
/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ia32 && got32x_reloc } } } } */ |
| 16 |
/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */ |
| 17 |
/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */ |
| 18 |
|