aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2011-07-28 19:48:48 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2011-07-28 19:48:48 +0000
commit86f98641242b99e49d98708bdad9ffa38396c141 (patch)
treec35a26fa319f6496800ec0e5fd254772e6980fd3 /gcc/expr.c
parentdc0ff1c802ef8a9e8075e5a8f4da9881848e08ab (diff)
downloadgcc-86f98641242b99e49d98708bdad9ffa38396c141.zip
gcc-86f98641242b99e49d98708bdad9ffa38396c141.tar.gz
gcc-86f98641242b99e49d98708bdad9ffa38396c141.tar.bz2
expr.c (get_bit_range): Handle *MEM_REF's.
* expr.c (get_bit_range): Handle *MEM_REF's. From-SVN: r176891
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 0988c51..59a20b7 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -4158,7 +4158,10 @@ get_bit_range (unsigned HOST_WIDE_INT *bitstart,
/* If other threads can't see this value, no need to restrict stores. */
if (ALLOW_STORE_DATA_RACES
- || (!ptr_deref_may_alias_global_p (innerdecl)
+ || ((TREE_CODE (innerdecl) == MEM_REF
+ || 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_STATIC (innerdecl))))
{