https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61655
--- Comment #4 from Marc Glisse ---
Look up "copy elision" (the wikipedia article will do).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61655
--- Comment #3 from Fabien Picarougne ---
This code is minimal and is just here to illustrate the problem, I use a more
complex one to handle generic matrix.
But The copy constructor here is not neutral, there is an output on stdout. So
I think,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61655
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61655
--- Comment #1 from Marc Glisse ---
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?