[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


--- 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>:


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


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


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

More information about the Gcc-bugs mailing list