]> granicus.if.org Git - clang/commitdiff
Move the test for PR13720 from Sema/init.c to Sema/thread-specifier.c.
authorHans Wennborg <hans@hanshq.net>
Wed, 29 Aug 2012 09:04:10 +0000 (09:04 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 29 Aug 2012 09:04:10 +0000 (09:04 +0000)
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

test/Sema/init.c
test/Sema/thread-specifier.c

index ee3e256b58865a92a9e5d37ec5428adf69555a4b..81a665dc6297d589c7e7f8e1d3a50a071424dc94 100644 (file)
@@ -157,10 +157,3 @@ int PR4386_zed() __attribute((weak));
 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.
-}
index c06aad8acbdb7c3c257bda3ba2362d1c740a3804..8c40fcd0a6454cd1692f54aa35d79d3deabaca6f 100644 (file)
@@ -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.
+}