PR fortran/98661 - valgrind issues with error recovery
authorHarald Anlauf <anlauf@gmx.de>
Thu, 14 Jan 2021 18:21:05 +0000 (19:21 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Thu, 14 Jan 2021 18:21:05 +0000 (19:21 +0100)
commit9e1e6e631045c7eed2c72738b7084986d39ca09f
tree2c8dfbbb8273e38837973ddb149cc486361a5403
parentc1a2cf88059fd9f709df507301d98a19f4c5b42b
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]