summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr65248-2.c
blob: af264f36a14e5babf250d802ea268b66ef871bdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile { target *-*-linux* } } */
/* { dg-options "-O2 -fpic" } */

/* Weak common symbol with -fpic.  */
__attribute__((weak, visibility("protected")))
int xxx;

int
foo ()
{
  return xxx;
}

/* { dg-final { scan-assembler-not "xxx\\(%rip\\)" { target { ! ia32 } } } } */
/* { dg-final { scan-assembler "xxx@GOTPCREL" { target { ! ia32 } } } } */
/* { dg-final { scan-assembler-not "xxx@GOTOFF" { target ia32 } } } */
/* { dg-final { scan-assembler "xxx@GOT\\(" { target ia32 } } } */