[Bug c++/105761] [11/12/13 Regression] ICE on hidden friend definition defined in base type since r11-388-gc4bff4c230c8d341

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 3 17:44:52 GMT 2022


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 <jason@gcc.gnu.org>:

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

commit r13-985-g284ae8b46f5eef74c0b660a87a7169497f559e73
Author: Jason Merrill <jason@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.


More information about the Gcc-bugs mailing list