Fortran : ICE in gfc_find_array_ref(): No ref found PR95981
authorMark Eggleston <markeggleston@gcc.gnu.org>
Tue, 30 Jun 2020 09:15:05 +0000 (10:15 +0100)
committerMark Eggleston <markeggleston@gcc.gnu.org>
Mon, 13 Jul 2020 14:11:45 +0000 (15:11 +0100)
commit3f069011019c9df670969ea283fd4d139f34a925
tree127481e64e7228960e35f124f96ef9ff5db11ef0
parenta1faa8e2470b33e92f6274804bf7941fbb6e2d38
Fortran  :  ICE in gfc_find_array_ref(): No ref found PR95981

When looking for an array reference allow NULL references.  If
no array reference is found dim_rank_check should return false.

2020-07-13  Steven G. Kargl  <kargl@gcc.gnu.org>

gcc/fortran/

PR fortran/95981
* check.c (dim_rank_check): Allow NULL references in call to
gfc_find_array_ref and return false if no reference is found.

2020-07-13  Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/testsuite/

PR fortran/95981
* gfortran.dg/pr95981.f90: New test.
gcc/fortran/check.c
gcc/testsuite/gfortran.dg/pr95981.f90 [new file with mode: 0644]