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

--- Comment #14 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to ibuclaw from comment #13)
> Confirmed, D is doing NRVO return whereas C++ isn't.

I am not sure that the NVRO is the issue (it is correct ABI for an 8 byte
struct to be returned in EAX:EDX).  The value can be "created" in the return
slot (i.e. doing the NVRO) without altering that.

------

If the caller is passing two regs it seems to me likely that (for some reason
it thinks that the value is returned via an sret pointer).

The callee then get s the set pointer in the register it is expecting *this to
be in... and boom .. we are broken at some point,

So it would seem that we might want to find a reproducer that we can look at
the various tree dumps and see if/where an sret is introduced?

(if that's not the cause, then we'll have to find a new hypothesis)

Reply via email to