This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/81147] [avr] C++ for -mmcu=atmega2560 doesn't do NRVO or RVO when class inherits from empty base


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81147

--- Comment #6 from Felipe Magno de Almeida <felipe at expertisesolutions dot com.br> ---
NRVO: Named Return Value Optimization
RVO: Return Value Optiomization

It is the eliminiation of copying when returning objects by value (or passed
by-value as parameters for rvalues).

The assembly shows copying from return values and/or parameters for avr gcc
which do not happen for x86, but only when the type inherits from other
classes, even if the base class is empty. This restriction doesn't happen with
x86-64 backend.

Regards,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]