tst-tlsmod13.c 227 B

1234567891011121314
  1. #include <tls.h>
  2. #if defined USE_TLS && defined HAVE___THREAD \
  3. && defined HAVE_TLS_MODEL_ATTRIBUTE
  4. __thread int a[2] __attribute__ ((tls_model ("initial-exec")));
  5. #else
  6. int a[2];
  7. #endif
  8. int
  9. foo (void)
  10. {
  11. return a[0];
  12. }