diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
| commit | 13cc256e404620c1de0cbcc4e43ce1e2dbbc4898 (patch) | |
| tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /test/Sema/thread-specifier.c | |
| parent | 657bc3d9848e3be92029b2416031340988cd0111 (diff) | |
Notes
Diffstat (limited to 'test/Sema/thread-specifier.c')
| -rw-r--r-- | test/Sema/thread-specifier.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/Sema/thread-specifier.c b/test/Sema/thread-specifier.c index 0d439b1669c1..8c40fcd0a645 100644 --- a/test/Sema/thread-specifier.c +++ b/test/Sema/thread-specifier.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -Wno-private-extern -verify -pedantic %s __thread int t1; __thread extern int t2; // expected-warning {{'__thread' before 'extern'}} @@ -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. +} |
