PR fortran/95707 - ICE in finish_equivalences, at fortran/trans-common.c:1319
authorHarald Anlauf <anlauf@gmx.de>
Sat, 20 Jun 2020 14:15:16 +0000 (16:15 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Sat, 20 Jun 2020 14:15:16 +0000 (16:15 +0200)
commit3345e74299687de6144b87c0632018cafd4ccf3b
treeae7ae1f8af38ba7f0d9e29f3cabbd3624f69ccf1
parentcd6546ac0e8fb2f4ff2a4bb2db2363ca02bdb7ba
PR fortran/95707 - ICE in finish_equivalences, at fortran/trans-common.c:1319

With submodules and equivalence declarations, name mangling may result in
long internal symbols overflowing internal buffers.  We now check that
we do not exceed the enlarged buffer sizes.

gcc/fortran/
PR fortran/95707
* gfortran.h (gfc_common_head): Enlarge buffer.
* trans-common.c (gfc_sym_mangled_common_id): Enlarge temporary
buffers, and add check on length on mangled name to prevent
overflow.
gcc/fortran/gfortran.h
gcc/fortran/trans-common.c
gcc/testsuite/gfortran.dg/pr95707.f90 [new file with mode: 0644]