https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61655
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- Try -fno-elide-constructors. Why would you want a copy? Is it because of the parentheses in the return statement that you expect elision not to be performed?