forked from OSchip/llvm-project
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:
parent
299f50b4e8
commit
fa4e41f73c
|
@ -157,10 +157,3 @@ int PR4386_zed() __attribute((weak));
|
||||||
typedef char strty[10];
|
typedef char strty[10];
|
||||||
struct vortexstruct { strty s; };
|
struct vortexstruct { strty s; };
|
||||||
struct vortexstruct vortexvar = { "asdf" };
|
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.
|
|
||||||
}
|
|
||||||
|
|
|
@ -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 t15; // expected-error {{non-thread-local declaration of 't15' follows thread-local declaration}}
|
||||||
int t16; // expected-note {{previous definition is here}}
|
int t16; // expected-note {{previous definition is here}}
|
||||||
__thread int t16; // expected-error {{thread-local declaration of 't16' follows non-thread-local declaration}}
|
__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.
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue