]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: repeated friend template [PR101894]
authorJason Merrill <jason@redhat.com>
Fri, 1 Apr 2022 20:18:31 +0000 (16:18 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 12 Apr 2022 20:12:48 +0000 (16:12 -0400)
commitad4b23729b2e57676efb3d8313f4fc5300b94339
treef1c1c9abc32b893e8a745063a51b2247d4bcba4f
parent3a17a1842350e7a9a6e81931e8ad66184b33efb2
c++: repeated friend template [PR101894]

Since olddecl isn't a definition, it doesn't get DECL_FRIEND_CONTEXT, so we
need to copy it from newdecl when we merge the declarations.

PR c++/101894

gcc/cp/ChangeLog:

* decl.c (duplicate_decls): Copy DECL_FRIEND_CONTEXT.

gcc/testsuite/ChangeLog:

* g++.dg/lookup/friend22.C: New test.
gcc/cp/decl.c
gcc/testsuite/g++.dg/lookup/friend22.C [new file with mode: 0644]