https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94609
--- Comment #4 from Iain Buclaw <ibuclaw at gdcproject dot org> --- (In reply to H.J. Lu from comment #2) > > RDI/EDI isn't used to pass argument. Is this done on purpose? Where does > D frontend decide how to pass argument? Ultimately the main deciding factor is whether or not the type is marked TREE_ADDRESSABLE. That triggers NRVO to be done on the return variable.