| 1 |
/* { dg-do compile { target { ! ia32 } } } */ |
| 2 |
/* { dg-require-effective-target maybe_x32 } */ |
| 3 |
/* { dg-options "-O2 -mx32 -ftls-model=initial-exec -maddress-mode=short" } */ |
| 4 |
|
| 5 |
struct gomp_task |
| 6 |
{ |
| 7 |
struct gomp_task *parent; |
| 8 |
}; |
| 9 |
|
| 10 |
struct gomp_thread |
| 11 |
{ |
| 12 |
int foo1; |
| 13 |
struct gomp_task *task; |
| 14 |
}; |
| 15 |
|
| 16 |
extern __thread struct gomp_thread gomp_tls_data; |
| 17 |
|
| 18 |
void |
| 19 |
__attribute__ ((noinline)) |
| 20 |
gomp_end_task (void) |
| 21 |
{ |
| 22 |
struct gomp_thread *thr = &gomp_tls_data; |
| 23 |
struct gomp_task *task = thr->task; |
| 24 |
|
| 25 |
thr->task = task->parent; |
| 26 |
} |