Can't use __thread in init.c because it doesn't have a triple.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162836
91177308-0d34-0410-b5e6-
96231b3b80d8
typedef char strty[10];
struct vortexstruct { strty s; };
struct vortexstruct vortexvar = { "asdf" };
-
-// PR13720
-__thread int thread_int;
-int *thread_int_ptr = &thread_int; // expected-error{{initializer element is not a compile-time constant}}
-void f() {
- int *p = &thread_int; // This is perfectly fine, though.
-}
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.
+}