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.

llvm-svn: 162836
This commit is contained in:
Hans Wennborg 2012-08-29 09:04:10 +00:00
parent 299f50b4e8
commit fa4e41f73c
2 changed files with 7 additions and 7 deletions

View 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.
}

View 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.
}