http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47258
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-15 02:03:43 UTC --- Can you try this patch: Index: tree-outof-ssa.c =================================================================== --- tree-outof-ssa.c (revision 67191) +++ tree-outof-ssa.c (revision 67192) @@ -1021,6 +1021,9 @@ insert_backedge_copies (void) basic_block bb; gimple_stmt_iterator gsi; + /* Make sure that edges have updated to be marked for back edges. */ + mark_dfs_back_edges (); + FOR_EACH_BB (bb) { /* Mark block as possibly needing calculation of UIDs. */ --- CUT --- I did not create this patch, it came from http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01865.html . Which means this is most likely fixed on the trunk already.