]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR fortran/96086 - ICE in gfc_match_select_rank, at fortran/match.c:6645
authorHarald Anlauf <anlauf@gmx.de>
Fri, 10 Jul 2020 19:00:13 +0000 (21:00 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Thu, 23 Jul 2020 19:06:46 +0000 (21:06 +0200)
commit6dd74062d215682e1f9b3ca618a9d38585dd4831
tree03c5556e05c06309efd34b1eb89e2994c198db82
parentbab0c51af90f475dab8f1b306737cd04b06d4b04
PR fortran/96086 - ICE in gfc_match_select_rank, at fortran/match.c:6645

Handle NULL pointer dereference on SELECT RANK with an invalid
assumed-rank array declaration.

gcc/fortran/
PR fortran/96086
* match.c (gfc_match_select_rank): Catch NULL pointer
dereference.
* resolve.c (resolve_assoc_var): Catch NULL pointer dereference
that may occur after an illegal declaration.

(cherry picked from commit 8a0b69f0b089c05d233b8e1a941825b1ceac93bd)
gcc/fortran/match.c
gcc/fortran/resolve.c
gcc/testsuite/gfortran.dg/pr96086.f90 [new file with mode: 0644]