aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/pr53249.c
blob: c41d3e9ededd278920eb4a87988ab84a28047bee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* { dg-do compile { target { ! { ia32 } } } } */
/* { dg-require-effective-target maybe_x32 } */
/* { dg-options "-O2 -mx32 -ftls-model=initial-exec -maddress-mode=short" } */

struct gomp_task
{
  struct gomp_task *parent;
};

struct gomp_thread
{
  int foo1;
  struct gomp_task *task;
};

extern __thread struct gomp_thread gomp_tls_data;

void
__attribute__ ((noinline))
gomp_end_task (void)
{
  struct gomp_thread *thr = &gomp_tls_data;
  struct gomp_task *task = thr->task;

  thr->task = task->parent;
}