dominance.c (calc_dfs_tree_nonrec): Reverse order of tests in if statement so we...
authorSteve Ellcey <sje@cup.hp.com>
Mon, 16 Jul 2001 16:48:31 +0000 (16:48 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 16 Jul 2001 16:48:31 +0000 (10:48 -0600)
        * dominance.c (calc_dfs_tree_nonrec): Reverse order of tests
        in if statement so we don't access undefined memory.

From-SVN: r44043

gcc/ChangeLog
gcc/dominance.c

index e22f06fcae42e685b11da378ff41c0849904ab6a..b80e0152e7a8d3e6ad8b02fc86f3228dcbb66cb0 100644 (file)
@@ -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
index 66ff11e2bae00ad3482fed915224c84c16afd1e9..8f5e0d370a070db01354c93cd7df8e6453751a47 100644 (file)
@@ -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;