summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-16 16:48:31 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-16 16:48:31 +0000
commit3868a52f3fd3cecd384c74299a3ac981eb2a9676 (patch)
tree21d75907d7beed2a70361b937b14212f359fb723
parent136971db016bde28c2ef9471a40c5dd3083c66da (diff)
downloadgcc-3868a52f3fd3cecd384c74299a3ac981eb2a9676.tar.gz
* dominance.c (calc_dfs_tree_nonrec): Reverse order of tests
in if statement so we don't access undefined memory. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44043 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dominance.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e22f06fcae4..b80e0152e7a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-07-16 Steve Ellcey <sje@cup.hp.com>
+
+ * dominance.c (calc_dfs_tree_nonrec): Reverse order of tests
+ in if statement so we don't access undefined memory.
+
2001-07-16 Daniel Berlin <dan@cgsoftware.com>
* ssa-ccp.c: (optimize_unexecutable_edges): Add note about removal
diff --git a/gcc/dominance.c b/gcc/dominance.c
index 66ff11e2bae..8f5e0d370a0 100644
--- a/gcc/dominance.c
+++ b/gcc/dominance.c
@@ -242,7 +242,7 @@ calc_dfs_tree_nonrec (di, bb, reverse)
/* If the next node BN is either already visited or a border
block the current edge is useless, and simply overwritten
with the next edge out of the current node. */
- if (di->dfs_order[bn->index] || bn == ex_block)
+ if (bn == ex_block || di->dfs_order[bn->index])
{
e = e->pred_next;
continue;
@@ -253,7 +253,7 @@ calc_dfs_tree_nonrec (di, bb, reverse)
else
{
bn = e->dest;
- if (di->dfs_order[bn->index] || bn == ex_block)
+ if (bn == ex_block || di->dfs_order[bn->index])
{
e = e->succ_next;
continue;