Fortran: NULL pointer dereference while parsing a function [PR107423]
authorSteve Kargl <kargl@gcc.gnu.org>
Mon, 12 Dec 2022 20:11:07 +0000 (21:11 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Tue, 13 Dec 2022 18:08:23 +0000 (19:08 +0100)
commit531ca06c007d4c4d156637083dcad7f25ac8713d
tree26dea60f73957d7a7b559a542d037bb8dee2cebb
parent69ec1e2065ac43eea44fdfa703cf027ce72a62da
Fortran: NULL pointer dereference while parsing a function [PR107423]

gcc/fortran/ChangeLog:

PR fortran/107423
* parse.cc (parse_spec): Avoid NULL pointer dereference when parsing
a function and an error occured.

gcc/testsuite/ChangeLog:

PR fortran/107423
* gfortran.dg/pr107423.f90: New test.
gcc/fortran/parse.cc
gcc/testsuite/gfortran.dg/pr107423.f90 [new file with mode: 0644]