diff options
author | Hans Wennborg <hans@hanshq.net> | 2012-08-29 09:04:10 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2012-08-29 09:04:10 +0000 |
commit | fa4e41f73cba538f00d19a9a06282b332f7b5d67 (patch) | |
tree | ee89eb890c2ccf0b59b1426a7c50cc4e0350b1a9 /clang | |
parent | 299f50b4e871d8b9769d74a8c831ce0166801edf (diff) | |
download | bcm5719-llvm-fa4e41f73cba538f00d19a9a06282b332f7b5d67.tar.gz bcm5719-llvm-fa4e41f73cba538f00d19a9a06282b332f7b5d67.zip |
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
Diffstat (limited to 'clang')
-rw-r--r-- | clang/test/Sema/init.c | 7 | ||||
-rw-r--r-- | clang/test/Sema/thread-specifier.c | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/clang/test/Sema/init.c b/clang/test/Sema/init.c index ee3e256b588..81a665dc629 100644 --- a/clang/test/Sema/init.c +++ b/clang/test/Sema/init.c @@ -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. -} diff --git a/clang/test/Sema/thread-specifier.c b/clang/test/Sema/thread-specifier.c index c06aad8acbd..8c40fcd0a64 100644 --- a/clang/test/Sema/thread-specifier.c +++ b/clang/test/Sema/thread-specifier.c @@ -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. +} |