------- Comment #5 from jakub at gcc dot gnu dot org  2009-02-10 14:11 -------
Created an attachment (id=17276)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17276&action=view)
gcc44-pr39124.patch

The problem is that remove_path first calls remove_bbs and afterwards
cancel_loop_tree.  The first call removes all bbs from one loop (a loop inside
of another loop that has niter == 0 and is peeled completely to nothing) and
the second attempts to remove it.  But, get_loop_body asserts the loop has at
least one bb, which is not true after all its bbs have been removed.

This patch fixes this by first calling cancel_loop_tree and afterwards
remove_bbs.  E.g. tree-loop-distribution.c also calls it in this order, first
cancel_loop_tree, then delete_basic_blocks.  Also cancel_loop comment suggests
that bbs should be removed afterwards.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39124

Reply via email to