http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48389
--- Comment #11 from Michael Matz <matz at gcc dot gnu.org> 2011-04-08 13:05:18 UTC --- I know what's the problem. Your patch can't work. commit_one_edge_insertion relies on edge splitting to work, which relies on being able to patch jump insns, which relies on correctly set JUMP_LABEL on those insns, hence rebuild_jump_labels (which in this case doesn't rebuild but really initializes JUMP_LABEL for the first time) must be called before inserting insns. So, no it can't even theoretically work, except if we rewrite how jumps are patched to redirect edges. I'd propose to change the interface to rebuild_jump_labels somewhat to only conditionally run over forced_labels. Then it can be called on the insn chains that are to be inserted on edges before insertion.