aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dce.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2011-03-31 07:28:29 -0600
committerJeff Law <law@gcc.gnu.org>2011-03-31 07:28:29 -0600
commite16b6fd0f7b7da99739f850360d6c86c5b1cba20 (patch)
tree9825cddc84870c8f20906bf543d746a838379d92 /gcc/tree-ssa-dce.c
parenteb1eb91413b50038212d148bf651c40e4d0e32f9 (diff)
downloadgcc-e16b6fd0f7b7da99739f850360d6c86c5b1cba20.zip
gcc-e16b6fd0f7b7da99739f850360d6c86c5b1cba20.tar.gz
gcc-e16b6fd0f7b7da99739f850360d6c86c5b1cba20.tar.bz2
tree-ssa-forwprop.c (forward_propagate_into_cond): Avoid typo potentially leading to null pointer dereference.
* tree-ssa-forwprop.c (forward_propagate_into_cond): Avoid typo potentially leading to null pointer dereference. * caller-save.c (new_saved_hard_reg): Eliminate return value. (setup_save_areas): Corresponding changes to avoid useless assignments. * jump.c (reversed_comparison_code_parts): Avoid successive return statements when REVERSE_CONDITION is defined. * expr.c (expand_assignment): Avoid useless assignments. (expand_expr_real_1): Likewise. (expand_expr_real_2): Avoid useless statements. * tree-ssa-phiopt.c (minmax_replacement): Avoid useless statement. * cfgexpand.c (expand_gimple_basic_block): Avoid useless assignment. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Avoid useless statements. * stmt.c (expand_expr_stmt): Avoid useless assignment. From-SVN: r171780
Diffstat (limited to 'gcc/tree-ssa-dce.c')
-rw-r--r--gcc/tree-ssa-dce.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c
index ce2d41b..c46836da 100644
--- a/gcc/tree-ssa-dce.c
+++ b/gcc/tree-ssa-dce.c
@@ -271,8 +271,6 @@ mark_operand_necessary (tree op)
static void
mark_stmt_if_obviously_necessary (gimple stmt, bool aggressive)
{
- tree lhs = NULL_TREE;
-
/* With non-call exceptions, we have to assume that all statements could
throw. If a statement may throw, it is inherently necessary. */
if (cfun->can_throw_non_call_exceptions && stmt_could_throw_p (stmt))
@@ -311,12 +309,6 @@ mark_stmt_if_obviously_necessary (gimple stmt, bool aggressive)
}
if (!gimple_call_lhs (stmt))
return;
- lhs = gimple_call_lhs (stmt);
- /* Fall through */
-
- case GIMPLE_ASSIGN:
- if (!lhs)
- lhs = gimple_assign_lhs (stmt);
break;
case GIMPLE_DEBUG: