summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr32219-10.c
blob: 3cd95f060fa8aef8da05df691b438f319b80a705 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Check that tpoff/ntpoff isn't used to access glob_a.  */
/* { dg-do compile { target *-*-linux* } } */
/* { dg-require-effective-target pie } */
/* { dg-options "-O2 -fpie" } */

extern __thread int glob_a;

int foo ()
{
  return glob_a;
}

/* glob_a should never be accessed with a tpoff.  */
/* { dg-final { scan-assembler-not "glob_a@tpoff" { target { ! ia32 } } } } */
/* glob_a should never be accessed with a ntpoff.  */
/* { dg-final { scan-assembler-not "glob_a@ntpoff" { target ia32 } } } */