]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR fortran/95880 - ICE in gfc_add_type, at fortran/symbol.c:2030
authorHarald Anlauf <anlauf@gmx.de>
Sun, 28 Jun 2020 11:52:09 +0000 (13:52 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Wed, 1 Jul 2020 19:50:28 +0000 (21:50 +0200)
commitf60918f960594ab6aa6d3082d342385210e8ac90
tree7d3f7a4540963455f748552f1ca43d87ed451d25
parenta833478ca9898fe287ad423e5af8462938886758
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)
gcc/fortran/symbol.c
gcc/testsuite/gfortran.dg/pr95880.f90 [new file with mode: 0644]