http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50682
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-11-23 16:43:36 UTC --- The problem here is that with all the -fno-* options we end up with code like: <bb 14>: D.2284_38 = &__size; <bb 35>: # D.2281_58 = PHI <&__size(14)> D.2283_59 = D.2281_58; D.2281_60 = D.2281_58; D.2281_61 = D.2281_58; __r_62 = *D.2281_58; at the beginning of ehcleanup2 pass. Then we clean up eh and as something changed, TODO_cleanup_cfg is requested. Only the cfgcleanup after ehcleanup2 will attempt to merge the above two blocks, which changes it to D.2284_38 = &__size; D.2283_59 = &__size; D.2281_60 = &__size; D.2281_61 = &__size; __r_62 = &__size; which unfortunately means that the last stmt in thise bb is considered to no longer throw and gimple_purge_dead_eh_edges is called on it. But there is no further ehcleanup afterwards. Calling remove_unreachable_handlers () from execute_cleanup_cfg_post_optimizing or scheduling another ehcleanup pass right before it would fix it, but it would make compilation tiny bit slower because of another pass through all stmts.