[Bug tree-optimization/30590] [4.1/4.2/4.3 Regression] tree-nrv optimization clobbers return variable
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Feb 4 01:55:00 GMT 2007
------- Comment #6 from pinskia at gcc dot gnu dot org 2007-02-04 01:54 -------
> + @@@ This is a kludge. Should look into removing the NRV
> + optimization from the C++ front end for GCC 4.3. */
You can't because the NVR optimization in the front-end also removes the copy
constructor call if would have been called. The question is how do you remove
the copy constructor after optimizations have might inlined it. Unless you do
NVR before any other optimization might have happened.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30590
More information about the Gcc-bugs
mailing list