aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog2
-rw-r--r--gcc/tree-ssa-dom.c12
2 files changed, 8 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0cbb31f..c5e3705 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -3,6 +3,8 @@
* c-common.c (fname_as_string): Free namep if we are returning
cstr.text.
+ * tree-ssa-dom.c (record_edge_info): Fix memory leak.
+
2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
* tree-cfg.c (remove_useless_stmts_cond): Call fold on COND_EXPR_COND.
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 5c60979..3a3bdad 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -2453,9 +2453,9 @@ record_edge_info (basic_block bb)
}
}
- if (is_gimple_min_invariant (op0)
- && (TREE_CODE (op1) == SSA_NAME
- || is_gimple_min_invariant (op1)))
+ else if (is_gimple_min_invariant (op0)
+ && (TREE_CODE (op1) == SSA_NAME
+ || is_gimple_min_invariant (op1)))
{
tree inverted = invert_truthvalue (cond);
struct edge_info *edge_info;
@@ -2479,9 +2479,9 @@ record_edge_info (basic_block bb)
}
}
- if (TREE_CODE (op0) == SSA_NAME
- && (is_gimple_min_invariant (op1)
- || TREE_CODE (op1) == SSA_NAME))
+ else if (TREE_CODE (op0) == SSA_NAME
+ && (is_gimple_min_invariant (op1)
+ || TREE_CODE (op1) == SSA_NAME))
{
tree inverted = invert_truthvalue (cond);
struct edge_info *edge_info;