]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR fortran/95088 - Buffer overflows with PDTs, submodules and long symbols
authorHarald Anlauf <anlauf@gmx.de>
Sun, 14 Jun 2020 14:12:47 +0000 (16:12 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Wed, 17 Jun 2020 19:47:13 +0000 (21:47 +0200)
commit55838f7fbd6e0131c2cc38e0eb903551c7fd2401
treed00b8b7f9bdd6af64d2348a4eac4005a9a1ebaa1
parent1bab254fd30c2b94a675b9057349fc80946375b1
PR fortran/95088 - Buffer overflows with PDTs, submodules and long symbols

With PDTs (parameterized derived types) and submodules, name mangling
results in variably long internal symbols.  Instead of using a fixed-size
intermediate buffer, which is actually not really needed, just use a
pointer to strings.

2020-06-14  Harald Anlauf  <anlauf@gmx.de>

gcc/fortran/
PR fortran/95088
* class.c (get_unique_type_string): Replace use of fixed size
buffer by internally passing a pointer to strings.

(cherry picked from commit 3ee9d82484bdc0ae5b1b21f4a3d8ff46d40e36fd)
gcc/fortran/class.c
gcc/testsuite/gfortran.dg/pr95088.f90 [new file with mode: 0644]