[cfe-commits] r162836 - in /cfe/trunk/test/Sema: init.c thread-specifier.c

Hans Wennborg hans at hanshq.net
Wed Aug 29 02:04:10 PDT 2012


Author: hans
Date: Wed Aug 29 04:04:10 2012
New Revision: 162836

URL: http://llvm.org/viewvc/llvm-project?rev=162836&view=rev
Log:
Move the test for PR13720 from Sema/init.c to Sema/thread-specifier.c.

Can't use __thread in init.c because it doesn't have a triple.

Modified:
    cfe/trunk/test/Sema/init.c
    cfe/trunk/test/Sema/thread-specifier.c

Modified: cfe/trunk/test/Sema/init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/init.c?rev=162836&r1=162835&r2=162836&view=diff
==============================================================================
--- cfe/trunk/test/Sema/init.c (original)
+++ cfe/trunk/test/Sema/init.c Wed Aug 29 04:04:10 2012
@@ -157,10 +157,3 @@
 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.
-}

Modified: cfe/trunk/test/Sema/thread-specifier.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/thread-specifier.c?rev=162836&r1=162835&r2=162836&view=diff
==============================================================================
--- cfe/trunk/test/Sema/thread-specifier.c (original)
+++ cfe/trunk/test/Sema/thread-specifier.c Wed Aug 29 04:04:10 2012
@@ -21,3 +21,10 @@
 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.
+}





More information about the cfe-commits mailing list