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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:284ae8b46f5eef74c0b660a87a7169497f559e73

commit r13-985-g284ae8b46f5eef74c0b660a87a7169497f559e73
Author: Jason Merrill <ja...@redhat.com>
Date:   Fri Jun 3 12:35:12 2022 -0400

    c++: redeclared hidden friend [PR105761]

    Here, when we see the second declaration of f we match it with the first
    one, copy over DECL_TEMPLATE_INFO, and then try to use it when parsing the
    definition, leading to confusion.

            PR c++/105761

    gcc/cp/ChangeLog:

            * decl.cc (duplicate_decls): Don't copy DECL_TEMPLATE_INFO
            from a hidden friend.

    gcc/testsuite/ChangeLog:

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

Reply via email to