Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target pie } */
3 /* { dg-options "-O2 -fpie" } */
4
5 /* Initialized symbol with -fpie. */
6 int xxx = -1;
7
8 int
9 foo ()
10 {
11 return xxx;
12 }
13
14 /* { dg-final { scan-assembler "movl\[ \t\]_?xxx\\(%rip\\), %eax" { target { ! ia32 } } } } */
15 /* { dg-final { scan-assembler-not "xxx@GOTPCREL" { target { ! ia32 } } } } */
16
17 /* { dg-final { scan-assembler "movl\[ \t\]xxx@GOTOFF\\(%\[^,\]*\\), %eax" { target { ia32 && { ! *-*-darwin* } } } } } */
18 /* { dg-final { scan-assembler-not "movl\[ \t\]xxx@GOT\\(%\[^,\]*\\), %eax" { target { ia32 && { ! *-*-darwin* } } } } } */
19
20 /* For Darwin m32, we need PIC (the default) to allow PIE. */
21 /* { dg-final { scan-assembler {movl[ \t]_xxx-L1\$pb\(%eax\),[ \t]%eax} { target { ia32 && *-*-darwin* } } } } */