tls.c 969 B

1234567891011121314151617181920212223242526
  1. // Test that TLS is correctly considered supported or unsupported for the
  2. // different targets.
  3. // Linux supports TLS.
  4. // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only %s
  5. // RUN: %clang_cc1 -triple i386-pc-linux-gnu -fsyntax-only %s
  6. // Darwin supports TLS since 10.7.
  7. // RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only %s
  8. // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -fsyntax-only %s
  9. // RUN: %clang_cc1 -triple x86_64-pc-win32 -fsyntax-only %s
  10. // RUN: %clang_cc1 -triple i386-pc-win32 -fsyntax-only %s
  11. // OpenBSD does not suppport TLS.
  12. // RUN: not %clang_cc1 -triple x86_64-pc-openbsd -fsyntax-only %s
  13. // RUN: not %clang_cc1 -triple i386-pc-openbsd -fsyntax-only %s
  14. // Haiku does not suppport TLS.
  15. // RUN: not %clang_cc1 -triple i586-pc-haiku -fsyntax-only %s
  16. // Bitrig suppports TLS.
  17. // RUN: %clang_cc1 -triple x86_64-pc-bitrig -fsyntax-only %s
  18. // RUN: %clang_cc1 -triple armv6-unknown-bitrig -fsyntax-only %s
  19. __thread int x;