https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99101
--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> --- Created attachment 50253 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50253&action=edit patch to streamline connect_infinite_loops_to_exit I'm considering this patch to make connect_infinite_loops_to_exit first connect noreturn blocks and only then process remaining unreachable blocks. For the testcase this avoids ending up with two fake edges to exit but it also means connect_inifinite_loops_to_exit no longer fixes the bug. I guess the function is then badly named (it was before) and it should instead be named add_fake_exit_edges or so, or connect_backwards_unreachable_blocks_to_exit.