summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr32219-1.c
blob: bb28f9f0f5863338421a906c0c08f2597f2ef30f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-require-effective-target pie } */
/* { dg-options "-O2 -fpie" } */

/* Initialized common symbol with -fpie.  */
int xxx = 5;
int xxx;

int
foo ()
{
  return xxx;
}

/* { dg-final { scan-assembler "movl\[ \t\]xxx\\(%rip\\), %eax" { target { ! ia32 } } } } */
/* { dg-final { scan-assembler-not "xxx@GOTPCREL" { target { ! ia32 } } } } */
/* { dg-final { scan-assembler "movl\[ \t\]xxx@GOTOFF\\(%\[^,\]*\\), %eax" { target ia32 } } } */
/* { dg-final { scan-assembler-not "movl\[ \t\]xxx@GOT\\(%\[^,\]*\\), %eax" { target ia32 } } } */