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>
Fri, 10 Jul 2020 19:00:13 +0000 (21:00 +0200)
commit8a0b69f0b089c05d233b8e1a941825b1ceac93bd
tree3e9ab99378053212e91fbd4877d2809ee3cd2b9a
parent2b6d99468d4d988fd5f5ea3e9be41a3dc95a1291
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.
gcc/fortran/match.c
gcc/fortran/resolve.c
gcc/testsuite/gfortran.dg/pr96086.f90 [new file with mode: 0644]