https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981
--- Comment #11 from jwjagersma at gmail dot com --- (In reply to Richard Biener from comment #10) > Some stmt-ends-BB predicates are probably off for asms. For stmt_ends_bb_p (tree-cfg.c:2763) the call chain looks like this: stmt_ends_bb_p -> is_ctrl_altering_stmt -> stmt_can_throw_internal -> stmt_could_throw_p -> gimple_asm_volatile_p So volatile asms are considered bb-enders, now that they have a landing pad, which stmt_can_throw_internal checks for. I am not sure how that works actually, do all throwing statements get a landing pad at first, even if there is no try block? Because that looks to be the case, I assume these are eliminated in some later pass. Using gdb I found that the DEBUG stmt is added in rewrite_stmt (tree-into-ssa.c:1417) which does so without considering if the bb has an EH edge or not. How does this work for other throwing statements?