summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tls/opt-9.c
blob: 49aa9085fddd0a3837cf5c2cbfb43fa4be2f198a (plain)
1
2
3
4
5
6
7
8
9
/* PR 21412 */
/* { dg-do compile */
/* { dg-require-effective-target fpic } */
/* { dg-options "-O2 -fPIC" } */
/* { dg-require-effective-target tls } */

struct S { int x[10]; };
extern __thread struct S s;
int *foo() { return &s.x[2]; }