tst-tlsmod13a.c 242 B

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