https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89478
--- Comment #3 from SztfG at yandex dot ru ---
Another testcase:
int test4 = []() constexpr {int a = a; a = 5; return a;}();
GCC is able compile this, so it "think" this is valid constexpr lambda, but
anyway doing this:
_GLOBAL__sub_I_test4:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89478
--- Comment #2 from SztfG at yandex dot ru ---
(In reply to Marc Glisse from comment #1)
> I think the uninitialized variable makes the initialization not constexpr
> (and indeed gcc/clang complain if you try to declare test constexpr). Then
> we
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89478
--- Comment #1 from Marc Glisse ---
I think the uninitialized variable makes the initialization not constexpr (and
indeed gcc/clang complain if you try to declare test constexpr). Then we hit
the well-known missed optimization that gcc is unable