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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Jason Merrill
<[email protected]>:

https://gcc.gnu.org/g:bfe565d996d0c7f7f12891f533153b6be1b815a8

commit r14-12095-gbfe565d996d0c7f7f12891f533153b6be1b815a8
Author: Jason Merrill <[email protected]>
Date:   Tue Oct 14 23:27:57 2025 +0300

    c++: pointer to auto member function [PR120757]

    Here r13-1210 correctly changed &A<int>::foo to not be considered
    type-dependent, but tsubst_expr of the OFFSET_REF got confused trying to
    tsubst a type that involved auto.  Fixed by getting the type from the
    member rather than tsubst.

            PR c++/120757

    gcc/cp/ChangeLog:

            * pt.cc (tsubst_expr) [OFFSET_REF]: Don't tsubst the type.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp1y/auto-fn66.C: New test.

    (cherry picked from commit ea6ef13d0fc4e020d8c405333153dad9eee1f18d)

Reply via email to