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

Richard Biener <rguenth at gcc dot gnu.org> changed:

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
On GIMPLE we see stores to the RESULT_DECL where accesses to that are not
expected to trap, this means on GIMPLE nothing prevents hoisting before EH
handling for example.  There probably isn't any incentive for a pass to do
that but nothing prevents it.

So I'd argue such ABI restriction cannot be implemented unless the caller
caters for it by using a temporary like we do in the "unwanted unoptimized"
code example.

I think also that C++ language semantics require that if a function F
throws an assignment as part of the function call is not carried out,
so it isn't an ABI issue alone.  (and for C we support -fexceptions
as well).

For EH we'd have stmt_could_throw_p () but I don't think we have anything
that tells us a callee does not return via longjmp.

Thus I don't see how to implement this correctly.

Reply via email to