https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52625
--- Comment #7 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:b40d45cb1930e9aa8a1f9a6a8728fd47ebeeaaac commit r11-8034-gb40d45cb1930e9aa8a1f9a6a8728fd47ebeeaaac Author: Jason Merrill <ja...@redhat.com> Date: Wed Apr 7 15:38:07 2021 -0400 c++: base template friend [PR52625] Here we were mistakenly treating the injected-class-name as a partial specialization. gcc/cp/ChangeLog: PR c++/52625 * pt.c (maybe_process_partial_specialization): Check DECL_SELF_REFERENCE_P. gcc/testsuite/ChangeLog: PR c++/52625 * g++.dg/template/friend70.C: New test.