https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118874
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Iain Sandoe from comment #10) > In the coroutine handling to deal with > https://eel.is/c++draft/dcl.fct.def.coroutine#7 > > we unconditionally create the return object in the <retval> slot - if we > create it somewhere else, that causes us to produce an unexpected additional > copy. If the return type has non-trivial copy ctor, then it is TREE_ADDRESSABLE type and so aggregate_value_p is true. This PR is just about the corner cases where the return type doesn't need to be returned in memory.