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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
lambda2 captures lambda1 by reference, and is then copied into func.  When
their block ends lambda1 no longer exists, so the reference in func is
dangling, and so invoking it has undefined behavior.

Reply via email to