aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tls/emutls-1.c
blob: a0dea509434784f68f6157853992605b7a844eb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do run { target *-wrs-vxworks } } */
/* { dg-require-effective-target tls } */

/* vxworks' TLS model requires no extra padding on the tls proxy
   objects.  */

__thread int i;
__thread int j;

extern int __tls__i;
extern int __tls__j;

int main ()
{
  int delta = ((char *)&__tls__j - (char *)&__tls__i);

  if (delta < 0)
    delta = -delta;
  
  return delta != 12;
}