[Bug inline-asm/93981] No EH information generated for asm statements

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 2 14:28:00 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to jwjagersma from comment #11)
> (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?

I guess it's a "first" for this case...  I'd say it should be reproducible
with call exceptions and a register LHS?!


More information about the Gcc-bugs mailing list