summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/tls/diag-4.m
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/objc.dg/tls/diag-4.m')
-rw-r--r--gcc/testsuite/objc.dg/tls/diag-4.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/tls/diag-4.m b/gcc/testsuite/objc.dg/tls/diag-4.m
new file mode 100644
index 000000000..38a5b3aba
--- /dev/null
+++ b/gcc/testsuite/objc.dg/tls/diag-4.m
@@ -0,0 +1,10 @@
+/* Invalid __thread specifiers. */
+/* { dg-require-effective-target tls } */
+
+__thread typedef int g4; /* { dg-error "'__thread' used with 'typedef'" } */
+
+void foo()
+{
+ __thread auto int l2; /* { dg-error "'__thread' used with 'auto'" } */
+ __thread register int l4; /* { dg-error "'__thread' used with 'register'" } */
+}