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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---

static auto get_wrapped_number() {
    return [i = 1] { return &i; };
}

This seems like you could reference a variable which has gone out of scope.

Reply via email to