[Bug c++/106864] Unexpected capture of "constexpr int" variable inside lambda

2025-01-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106864 Andrew Pinski changed: What|Removed |Added CC||rush102333 at gmail dot com --- Comment

[Bug c++/106864] Unexpected capture of "constexpr int" variable inside lambda

2022-10-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106864 --- Comment #2 from Andrew Pinski --- Take: void bad() { constexpr int x = 123; auto Outer = [&] [[gnu::noipa]] () { auto L = [=] [[gnu::noipa]] () { const int *x1 = &x; for (int i = 0; i < *x1; ++i) { asm("":::"memory"); }

[Bug c++/106864] Unexpected capture of "constexpr int" variable inside lambda

2022-10-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106864 Andrew Pinski changed: What|Removed |Added Keywords||missed-optimization --- Comment #1 from