summaryrefslogtreecommitdiffstats
path: root/test/Sema/thread-specifier.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/thread-specifier.c')
-rw-r--r--test/Sema/thread-specifier.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/Sema/thread-specifier.c b/test/Sema/thread-specifier.c
index 0d439b1..8c40fcd 100644
--- a/test/Sema/thread-specifier.c
+++ b/test/Sema/thread-specifier.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -verify -pedantic %s
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -Wno-private-extern -verify -pedantic %s
__thread int t1;
__thread extern int t2; // expected-warning {{'__thread' before 'extern'}}
@@ -21,3 +21,10 @@ __thread int t15; // expected-note {{previous definition is here}}
int t15; // expected-error {{non-thread-local declaration of 't15' follows thread-local declaration}}
int t16; // expected-note {{previous definition is here}}
__thread int t16; // expected-error {{thread-local declaration of 't16' follows non-thread-local declaration}}
+
+// PR13720
+__thread int thread_int;
+int *thread_int_ptr = &thread_int; // expected-error{{initializer element is not a compile-time constant}}
+void g() {
+ int *p = &thread_int; // This is perfectly fine, though.
+}
OpenPOWER on IntegriCloud