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

--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Patrick Palka
<ppa...@gcc.gnu.org>:

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

commit r14-11256-gc061ad5a36ba0c07d3d9d82a85aebb887def759d
Author: Patrick Palka <ppa...@redhat.com>
Date:   Tue Jan 28 09:27:02 2025 -0500

    c++: friend vs inherited guide confusion [PR117855]

    We recently started using the lang_decl_fn::context field to track
    inheritedness of a deduction guide (for C++23 inherited CTAD).  This
    new overloading of the field accidentally made DECL_FRIEND_CONTEXT
    return non-NULL for inherited guides, which breaks the below testcase
    during overload resolution with an inherited guide.

    This patch fixes this by refining DECL_FRIEND_CONTEXT appropriately.

            PR c++/117855

    gcc/cp/ChangeLog:

            * cp-tree.h (DECL_FRIEND_CONTEXT): Exclude deduction guides.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp23/class-deduction-inherited7.C: New test.

    Reviewed-by: Jason Merrill <ja...@redhat.com>
    (cherry picked from commit ea578dd251eaf6304b0c95acc107f9a4d63bee8f)

Reply via email to