https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95880
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:e3942f91376ba29a8014fd19f7719c5697ac05e8 commit r10-8389-ge3942f91376ba29a8014fd19f7719c5697ac05e8 Author: Harald Anlauf <anl...@gmx.de> Date: Sun Jun 28 13:52:09 2020 +0200 PR fortran/95880 - ICE in gfc_add_type, at fortran/symbol.c:2030 The fix for PR39695 did not properly distinguish between procedure names and other symbols names in errors emitted for invalid code. Fix that. gcc/fortran/ PR fortran/95880 * symbol.c (gfc_add_type): If sym->ns->proc_name is set, use it, otherwise fall back to sym->name. (cherry picked from commit f3a8f66a83f8c94f6fbb0233cefba8032f2e4876)