https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120409
--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> --- well .. the visible difference in gimple, but this is code outside of the coroutines changes (i.e. just a bit of regular C++). However, it does seem we create the return object correctly .. and then return an empty one. We seem to be failing to do copy elision. (I have not analysed the mx32 case any further - but doing tests on BE Power target) sparc9-solaris: struct OptionalPromiseReturn folly::OptionalPromise::get_return_object (struct OptionalPromise * const this) { struct OptionalPromiseReturn D.9045; struct OptionalPromiseReturn D.8785; try { folly::OptionalPromiseReturn::OptionalPromiseReturn (&D.8785, this); D.9045 = D.8785; return D.9045; } finally { D.8785 = {CLOBBER(eos)}; } } ==== x86_64-darwin struct OptionalPromiseReturn folly::OptionalPromise::get_return_object (struct OptionalPromise * const this) { folly::OptionalPromiseReturn::OptionalPromiseReturn (&<retval>, this); return <retval>; }