Fortran: Fix ICE after error regression [PR99060].
authorPaul Thomas <pault@gcc.gnu.org>
Thu, 11 Feb 2021 10:38:23 +0000 (10:38 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Thu, 11 Feb 2021 10:38:23 +0000 (10:38 +0000)
commit5ee5415af8691640b0f7a5332b78d04ba309f4f0
tree0a67e473c515561c8c9f07998009f7d289bb296c
parent2e9dfa4bff267913654bd5f2c3b5efc1b1268a2e
Fortran: Fix ICE after error regression [PR99060].

2021-02-11  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/99060
* primary.c (gfc_match_varspec): Test for non-null 'previous'
before using its name in the error message.

gcc/testsuite/
PR fortran/99060
* gfortran.dg/pr99060.f90: New test.
gcc/fortran/primary.c
gcc/testsuite/gfortran.dg/pr99060.f90 [new file with mode: 0644]