tst-tlsmod13.c 209 B

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