diff options
Diffstat (limited to 'test/tls/tst-tlsmod13.c')
-rw-r--r-- | test/tls/tst-tlsmod13.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/tls/tst-tlsmod13.c b/test/tls/tst-tlsmod13.c new file mode 100644 index 000000000..beca89f6f --- /dev/null +++ b/test/tls/tst-tlsmod13.c @@ -0,0 +1,14 @@ +#include <tls.h> + +#if defined USE_TLS && defined HAVE___THREAD \ + && defined HAVE_TLS_MODEL_ATTRIBUTE +__thread int a[2] __attribute__ ((tls_model ("initial-exec"))); +#else +int a[2]; +#endif + +int +foo (void) +{ + return a[0]; +} |