http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58359
--- Comment #6 from Anatoly Sinyavin <a.sinyavin at samsung dot com> --- I have created two patches to fix this problem. The first patch (bug_fix_58359_builit_unreachable.patch) just moves functionality of optimize_unreachable from "fab" pass to "cfg" pass The second patch (bug_fix_58359_builit_unreachable.AGGRESSIVE.patch) is more aggressive variant. Origininal implementation of optimize_unreachable doesn't delete basic block if there is FORCED_LABEL, non debug statemnt, or call function before __built_unreachable in this basic block. I think we can't delete basic block if it contains some statement X before __built_unreachable. This statement X can potentially transfer control from this basic block and can't return. It's possible in two cases: if statement X is procedure call (without return) or assembler instruction. (See also __built_unreachable description)