From 86f98641242b99e49d98708bdad9ffa38396c141 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Thu, 28 Jul 2011 19:48:48 +0000 Subject: [PATCH] expr.c (get_bit_range): Handle *MEM_REF's. * expr.c (get_bit_range): Handle *MEM_REF's. From-SVN: r176891 --- gcc/ChangeLog | 4 ++++ gcc/expr.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8b6111e6630..6c0ec7cfd8b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2011-07-28 Aldy Hernandez + + * expr.c (get_bit_range): Handle *MEM_REF's. + 2011-07-28 Bernd Schmidt * rtlanal.c (tablejump_p): False for returns. diff --git a/gcc/expr.c b/gcc/expr.c index 0988c51e545..59a20b79edf 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)))) { -- 2.30.2