http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48000
--- Comment #4 from Zdenek Dvorak <rakdver at gcc dot gnu.org> 2011-03-06 10:43:41 UTC --- Created attachment 23559 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23559 A proposed patch This fixes the problem uncovered by the previous fix. In fix_bb_placements, we restrict the placement changes to the basic blocks that originally were in the base loop (the loop containing the FROM basic block). This is achieved by marking the header of the loop visited, so that we never enter it to the processing queue. However, if FROM itself is the header of the loop, this fails, as we enter FROM to the queue unconditionally. Fixed by ending immediatelly if FROM is a loop header.