http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52139
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26602|0 |1 is obsolete| | --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-07 12:20:19 UTC --- Created attachment 26603 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26603 gcc47-pr52139.patch Actually, the delete_insn_chain call removed the barrier, but as barriers don't have BLOCK_FOR_INSN, it didn't update BB_END. This is a different approach, which allows remove_insn to remove even the last insn in a bb, if it is equal to BB_END. And adjusts BB_END even if BB_END is a BARRIER. That part alternatively could be handled by forcibly setting BB_END (a) = first; after the delete_insn_chain call for the header. With the emit-rtl.c changes as is, the cfgrtl.c changes are just a cleanup to merge two same code sequences, but if the second part of the emit-rtl.c change is removed, we'd need to add that BB_END (a) = first;