Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr32219-2.c

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target pie } */
3 /* { dg-options "-O2 -fpic" } */
4
5 /* Common symbol with -fpic. */
6 int xxx;
7
8 int
9 foo ()
10 {
11 return xxx;
12 }
13
14 /* { dg-final { scan-assembler-not "movl\[ \t\]xxx\\(%rip\\), %" { target { ! ia32 } } } } */
15 /* For Darwin m64 PIC we make a direct access to this symbol. */
16 /* { dg-final { scan-assembler "xxx@GOTPCREL" { target { { ! ia32 } && { ! *-*-darwin* } } } } } */
17
18 /* { dg-final { scan-assembler-not "movl\[ \t\]xxx@GOTOFF\\(%\[^,\]*\\), %" { target { ia32 && { ! *-*-darwin* } } } } } */
19 /* { dg-final { scan-assembler "movl\[ \t\]xxx@GOT\\(%\[^,\]*\\), %" { target { ia32 && { ! *-*-darwin* } } } } } */
20
21 /* Darwin m32 PIC requires the picbase adjustment. */
22 /* { dg-final { scan-assembler {movl[ \t]_xxx-L1\$pb\(%eax\),[ \t]%eax} { target { ia32 && *-*-darwin* } } } } */
23