]> git.ipfire.org Git - thirdparty/gcc.git/commit
fortran: error recovery on duplicate declaration of class variable [PR95710]
authorHarald Anlauf <anlauf@gmx.de>
Fri, 22 Sep 2023 19:06:00 +0000 (21:06 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Sat, 23 Sep 2023 17:21:19 +0000 (19:21 +0200)
commit767eea9ea22f0247be9a56fd2e1d460ddfbbf6d9
treeffa89749507edbde09d1767889bf468b8cffd2b1
parentd6679fa2d65316e80a267c94c17ad9e23f433f77
fortran: error recovery on duplicate declaration of class variable [PR95710]

gcc/fortran/ChangeLog:

PR fortran/95710
* class.cc (gfc_build_class_symbol): Do not try to build class
container for invalid typespec.
* resolve.cc (resolve_fl_var_and_proc): Prevent NULL pointer
dereference.
(resolve_symbol): Likewise.

gcc/testsuite/ChangeLog:

PR fortran/95710
* gfortran.dg/pr95710.f90: New test.
gcc/fortran/class.cc
gcc/fortran/resolve.cc
gcc/testsuite/gfortran.dg/pr95710.f90 [new file with mode: 0644]