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

2020-03-04 Thread jwjagersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981 --- Comment #15 from jwjagersma at gmail dot com --- Created attachment 47970 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47970=edit alternative patch v3 Alternative to last patch. Inserts the debug stmt across the fallthrough edge. Let

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

2020-03-02 Thread jwjagersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981 jwjagersma at gmail dot com changed: What|Removed |Added Attachment #47941|0 |1 is obsolete|

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

2020-03-02 Thread jwjagersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981 --- Comment #13 from jwjagersma at gmail dot com --- Is there some point at which debug statements are supposed to be copied over to the next BBs? That appears to be what maybe_move_debug_stmts_to_successors (tree-inline.c:2799) does, but it is

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

2020-03-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981 --- Comment #12 from Richard Biener --- (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

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

2020-03-02 Thread jwjagersma at gmail dot com
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 ->

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

2020-03-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981 --- Comment #10 from Richard Biener --- Some stmt-ends-BB predicates are probably off for asms.

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

2020-03-01 Thread jwjagersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981 --- Comment #9 from jwjagersma at gmail dot com --- ICE can be replicated with: ``` $ ./cc1plus -O -g -fnon-call-exceptions -I../../gcc/libgcc ../../gcc/libgcc/config/i386/sfp-exceptions.c void __sfp_handle_exceptions(int) Analyzing compilation

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

2020-03-01 Thread jwjagersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981 --- Comment #8 from jwjagersma at gmail dot com --- (In reply to Segher Boessenkool from comment #7) > Ah right, only for -fnon-call-exceptions, I missed that; that is implied > by stmt_can_throw_internal. > > Why only volatile memory operands,

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

2020-03-01 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981 --- Comment #7 from Segher Boessenkool --- (In reply to jwjagersma from comment #5) > (In reply to Segher Boessenkool from comment #4) > > Pretending any asm can throw would be a pretty serious code degradation. > > > > Any asm that is not

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

2020-03-01 Thread jwjagersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981 jwjagersma at gmail dot com changed: What|Removed |Added Attachment #47936|0 |1 is obsolete|

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

2020-02-29 Thread jwjagersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981 --- Comment #5 from jwjagersma at gmail dot com --- (In reply to Segher Boessenkool from comment #4) > Pretending any asm can throw would be a pretty serious code degradation. > > Any asm that is not volatile cannot throw (and be correct code).

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

2020-02-29 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981 --- Comment #4 from Segher Boessenkool --- Pretending any asm can throw would be a pretty serious code degradation. Any asm that is not volatile cannot throw (and be correct code). But most volatile asm in the wild can never throw, either.

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

2020-02-29 Thread jwjagersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981 --- Comment #3 from jwjagersma at gmail dot com --- I don't think it needs to. The user can do this manually with .cfi directives.

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

2020-02-29 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981 Segher Boessenkool changed: What|Removed |Added CC||segher at gcc dot gnu.org ---

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

2020-02-29 Thread jwjagersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93981 --- Comment #1 from jwjagersma at gmail dot com --- Created attachment 47936 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47936=edit proposed patch