diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-02-05 01:18:02 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-02-05 01:18:02 +0000 |
commit | c34f8a7844e5dc3703f4333015af25aaabec7b0e (patch) | |
tree | 56e68154a7b8fc728b201d3220d4c952afea9169 /gcc/c-common.c | |
parent | 7f28086cba6019cf0da2f73ea1e2d28886adb7d9 (diff) | |
download | gcc-c34f8a7844e5dc3703f4333015af25aaabec7b0e.tar.gz |
PR c/35435
* c-common.c (handle_tls_model_attribute): Ignore attribute for
non-VAR_DECLs without checking DECL_THREAD_LOCAL_P.
testsuite:
* gcc.dg/tls/diag-6.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143948 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 81992d4672f..dbc9676b099 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -6263,7 +6263,7 @@ handle_tls_model_attribute (tree *node, tree name, tree args, *no_add_attrs = true; - if (!DECL_THREAD_LOCAL_P (decl)) + if (TREE_CODE (decl) != VAR_DECL || !DECL_THREAD_LOCAL_P (decl)) { warning (OPT_Wattributes, "%qE attribute ignored", name); return NULL_TREE; |