diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-16 16:48:31 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-16 16:48:31 +0000 |
commit | 3868a52f3fd3cecd384c74299a3ac981eb2a9676 (patch) | |
tree | 21d75907d7beed2a70361b937b14212f359fb723 /gcc/dominance.c | |
parent | 136971db016bde28c2ef9471a40c5dd3083c66da (diff) | |
download | gcc-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
Diffstat (limited to 'gcc/dominance.c')
-rw-r--r-- | gcc/dominance.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |