aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-operands.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-operands.c')
-rw-r--r--gcc/tree-ssa-operands.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index 200f4b5..85b777f 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -1295,6 +1295,18 @@ get_indirect_ref_operands (tree stmt, tree expr, int flags)
/* Stores into INDIRECT_REF operands are never killing definitions. */
flags &= ~opf_kill_def;
+ if (REF_ORIGINAL (expr))
+ {
+ enum tree_code ocode = TREE_CODE (REF_ORIGINAL (expr));
+
+ /* If we originally accessed part of a structure, we do it still. */
+ if (ocode == ARRAY_REF
+ || ocode == COMPONENT_REF
+ || ocode == REALPART_EXPR
+ || ocode == IMAGPART_EXPR)
+ flags &= ~opf_kill_def;
+ }
+
if (SSA_VAR_P (ptr))
{
struct ptr_info_def *pi = NULL;