[Bug c++/89478] missed optimization for lambda expression when variable is uninitialized when declared

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Aug 8 04:50:46 GMT 2021


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|tree-optimization           |c++
             Blocks|                            |54367

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
For the original testcase except for test4, it is optimized for C++20 and not
C++17.  Most likely because lambdas are considered constexpr if they can be
such. In test4 I suspect the uninit variable is making it not considered
constexpr.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54367
[Bug 54367] [meta-bug] lambda expressions


More information about the Gcc-bugs mailing list