On Mon, Mar 16, 2020 at 07:46:57PM +0000, Richard Sandiford wrote:
> > The write to "x" *before the asm* is deleted.  I cannot think of any
> > interpretation where that is correct (this does not involve inline asm
> > at all: it is deleting an observable side effect before the exception).
> 
> It's correct under the contract above :-)

That cannot be, because the generated code does the wrong thing before
the asm is executed already (and without UB there is no time travel).

> > Yes, obviously.  The other option is to accept that almost all existing
> > inline asm will have UB, with -fnon-call-exceptions.  I think that is
> > an even less desirable option.

(I'm assuming we do not want that option).

> Normally, for SSA names in something like:
> 
>   _1 = foo ()
> 
> the definition of _1 does not take place when foo throws.

But that is not how RTL works, afaik.


Segher

Reply via email to