[Bug middle-end/90408] >= -O2 suddenly generates code
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Sep 5 09:05:33 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90408
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=98265
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So now -O1, -O2 and -O3 produce the same code, most likely after
r10-9646/r11-7940 .
-Os just does not inline the constructor ( std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >&&) [complete object constructor]).
So I think this is fixed in GCC 10.3 and GCC 11+.
More information about the Gcc-bugs
mailing list