PR fortran/98661 - valgrind issues with error recovery
authorHarald Anlauf <anlauf@gmx.de>
Thu, 14 Jan 2021 18:13:16 +0000 (19:13 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Thu, 14 Jan 2021 18:13:16 +0000 (19:13 +0100)
commitd0d2becf2dfe8316c9014d962e7f77773ec5c27e
tree8e997315d27a99cc129b19864c2b5ecd6f2ad840
parent9ac3e2feb3da89eda7a783d2c675ec897e81b338
PR fortran/98661 - valgrind issues with error recovery

During error recovery after an invalid derived type specification it was
possible to try to resolve an invalid array specification.  We now skip
this if the component has the ALLOCATABLE or POINTER attribute and the
shape is not deferred.

gcc/fortran/ChangeLog:

PR fortran/98661
* resolve.c (resolve_component): Derived type components with
ALLOCATABLE or POINTER attribute shall have a deferred shape.

gcc/testsuite/ChangeLog:

PR fortran/98661
* gfortran.dg/pr98661.f90: New test.
gcc/fortran/resolve.c
gcc/testsuite/gfortran.dg/pr98661.f90 [new file with mode: 0644]