https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103703
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Sebor <mse...@gcc.gnu.org>: https://gcc.gnu.org/g:93faac7e32e4f9503c559f2a3e5a4732f5e9ea09 commit r12-6024-g93faac7e32e4f9503c559f2a3e5a4732f5e9ea09 Author: Martin Sebor <mse...@redhat.com> Date: Thu Dec 16 15:11:45 2021 -0700 Check for class type before assuming a type is one [PR103703]. Resolves: PR c++/103703 - ICE with -Wmismatched-tags with friends and templates gcc/cp/ChangeLog: PR c++/103703 * parser.c (class_decl_loc_t::diag_mismatched_tags): Check for class type before assuming a type is one. gcc/testsuite/ChangeLog: PR c++/103703 * g++.dg/warn/Wmismatched-tags-9.C: New test.