This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix thinko on get_expr_operands, comitted
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 13 Jul 2005 00:05:50 +0200
- Subject: Fix thinko on get_expr_operands, comitted
Hi,
the following patch was pre-approved by Diego and bootstrapped/regtested
i686-pc-gnu-linux. It makes the subvars to get MUST_DEF correctly.
Honza
2005-07-13 Jan Hubicka <jh@suse.cz>
* tree-ssa-operands.c (parse_ssa_operands): Fix formatting.
(get_expr_operands): Fix thinko wrt flags and subvars.
Index: tree-ssa-operands.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-operands.c,v
retrieving revision 2.93
diff -c -3 -p -r2.93 tree-ssa-operands.c
*** tree-ssa-operands.c 10 Jul 2005 00:27:51 -0000 2.93
--- tree-ssa-operands.c 12 Jul 2005 15:29:59 -0000
*************** parse_ssa_operands (tree stmt)
*** 896,902 ****
if (TREE_CODE (lhs) == VIEW_CONVERT_EXPR)
lhs = TREE_OPERAND (lhs, 0);
! if (TREE_CODE (lhs) != ARRAY_REF && TREE_CODE (lhs) != ARRAY_RANGE_REF
&& TREE_CODE (lhs) != BIT_FIELD_REF
&& TREE_CODE (lhs) != REALPART_EXPR
&& TREE_CODE (lhs) != IMAGPART_EXPR)
--- 896,903 ----
if (TREE_CODE (lhs) == VIEW_CONVERT_EXPR)
lhs = TREE_OPERAND (lhs, 0);
! if (TREE_CODE (lhs) != ARRAY_REF
! && TREE_CODE (lhs) != ARRAY_RANGE_REF
&& TREE_CODE (lhs) != BIT_FIELD_REF
&& TREE_CODE (lhs) != REALPART_EXPR
&& TREE_CODE (lhs) != IMAGPART_EXPR)
*************** get_expr_operands (tree stmt, tree *expr
*** 1325,1333 ****
bool exact;
if (overlap_subvar (offset, size, sv, &exact))
{
if (!exact)
! flags &= ~opf_kill_def;
! add_stmt_operand (&sv->var, s_ann, flags);
}
}
}
--- 1326,1335 ----
bool exact;
if (overlap_subvar (offset, size, sv, &exact))
{
+ bool subvar_flags = flags;
if (!exact)
! subvar_flags &= ~opf_kill_def;
! add_stmt_operand (&sv->var, s_ann, subvar_flags);
}
}
}