https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100850
--- Comment #5 from Vlad ---
> Can this be closed then?
Sure. Thanks you very much!
For the history, before it's closed I'd like to leave this reference:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100850
--- Comment #3 from Vlad ---
My bad. It's actually a UB. The lambda lifetime is just over by the moment of
resumption of the co-routine.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100850
--- Comment #2 from Vlad ---
Yet another piece -- appears with -O2/-O3/-Os.
-O0/-O1 is free from this bug.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100850
--- Comment #1 from Vlad ---
Forgot to mention... It seems to be a regression -- gcc 10.2 and 10.3 don't
demonstrate the issue on this example.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100850
Bug ID: 100850
Summary: [coroutine] Wrong addresses of variables captured by
reference into lambda co-routines.
Product: gcc
Version: 11.1.0
Status: UNCONFIRMED