* cfgloopmanip.c (fix_irreducible_loops): Initialize e correctly.
authorZdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
Tue, 7 Oct 2003 22:14:07 +0000 (00:14 +0200)
committerZdenek Dvorak <rakdver@gcc.gnu.org>
Tue, 7 Oct 2003 22:14:07 +0000 (22:14 +0000)
From-SVN: r72207

gcc/ChangeLog
gcc/cfgloopmanip.c

index 9d8ee4132e4fd1bc8e86dde62ac4714054ea49fe..eb5b68724ba5c857482a8d441def3aad1311e80f 100644 (file)
@@ -1,3 +1,7 @@
+2003-10-07  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
+
+       * cfgloopmanip.c (fix_irreducible_loops): Initialize e correctly.
+
 2003-10-07  Jason Merrill  <jason@redhat.com>
 
        PR c++/12519
index de1210ce3f255b63ae58ab6d143480bc88c325d0..ca50760f3840f401f560f757d5659b90576ce720 100644 (file)
@@ -310,18 +310,22 @@ fix_irreducible_loops (basic_block from)
        }
 
       for (i = 0; i < n_edges; i++)
-       if (e->flags & EDGE_IRREDUCIBLE_LOOP)
-         {
-           if (!flow_bb_inside_loop_p (from->loop_father, e->dest))
-             continue;
+       {
+         e = edges[i];
 
-           e->flags &= ~EDGE_IRREDUCIBLE_LOOP;
-           if (TEST_BIT (on_stack, e->dest->index))
-             continue;
+         if (e->flags & EDGE_IRREDUCIBLE_LOOP)
+           {
+             if (!flow_bb_inside_loop_p (from->loop_father, e->dest))
+               continue;
 
-           SET_BIT (on_stack, e->dest->index);
-           stack[stack_top++] = e->dest;
-         }
+             e->flags &= ~EDGE_IRREDUCIBLE_LOOP;
+             if (TEST_BIT (on_stack, e->dest->index))
+               continue;
+
+             SET_BIT (on_stack, e->dest->index);
+             stack[stack_top++] = e->dest;
+           }
+       }
       free (edges);
     }