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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu.org

--- Comment #14 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Created attachment 32997
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32997&action=edit
RFC patch

After playing around with aliases (of extern symbols) for a while I
decided that any such fix to this problem would be too invasive and
generally terrible.  Therefore, I set out to prepare a patch that
would put the leaf flag into individual gimple call statements and
that would also do what Richi suggested in comment #10, ie. remove
MODIFIED_NORETURN_CALLS by having a noreturn flag in calls too.

I may not get back to this for a while so I'm posting what I've got,
inviting comments on the general direction of the patch, even though
it is not at the submission level yet.  It bootstraps but it
introduces one (yet totally unexamined) asan test failure.  I'm also
worried about the occasional discrepancy between the decl and the call
noreturn flags, it would be nice to make it somehow clearer when to
use what.

I've also started to think that setting both the two new flags lazily
in the cfg cleanup was probably a mistake.  Verifier requires special
treatment when noreturn IS set and when leaf IS NOT set, which means
that the cfg cleanup sometimes must be run even though the cfg has not
actually changed (but a call was re-built) which is weird.
So in the next iteration I'll probably try to set the leaf flag when
building the statement and maintain it from that point on.

But that may not happen until late July.  Meanwhile, almost anyone
bumping into this problem can use the first provisional fix.

Reply via email to