diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-22 15:00:06 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-22 15:00:06 +0000 |
commit | a0a66c9fb3c4b8bb3ef43c6970ed893118422440 (patch) | |
tree | 08080223cc398647487dd024de0b654081310a32 /gcc/expr.c | |
parent | a9031a3e7e8da4239d1387fc3b7e2125c49cc754 (diff) | |
download | gcc-a0a66c9fb3c4b8bb3ef43c6970ed893118422440.tar.gz |
PR middle-end/50141
* expr.c (get_bit_range): Only use DECL_THREAD_LOCAL_P if
innerdecl is a VAR_DECL.
* c-c++-common/cxxbitfields-6.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177957 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 82873eb8376..ee16b6a469e 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -4354,7 +4354,8 @@ get_bit_range (unsigned HOST_WIDE_INT *bitstart, || TREE_CODE (innerdecl) == TARGET_MEM_REF) && !ptr_deref_may_alias_global_p (TREE_OPERAND (innerdecl, 0))) || (DECL_P (innerdecl) - && (DECL_THREAD_LOCAL_P (innerdecl) + && ((TREE_CODE (innerdecl) == VAR_DECL + && DECL_THREAD_LOCAL_P (innerdecl)) || !TREE_STATIC (innerdecl)))) { *bitstart = *bitend = 0; |