[Bug tree-optimization/119930] [16 regression] g++.dg/coroutines/torture/pr103953.C FAILs with -O3

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Mar 7 19:06:50 GMT 2026


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

--- Comment #21 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Wait I think this code might be undefined or maybe I don't understand the
lifetime extending rules.

Take:
```
        task coroutine_B = [&coroutine_A]() ->task {
            co_await coroutine_A;
        }();
```
The lambda object here ends at the end of the statement right? as it is a
temporary and there is nothing to extend the lifetime.


More information about the Gcc-bugs mailing list