PR fortran/97491 - Wrong restriction for VALUE arguments of pure procedures
authorHarald Anlauf <anlauf@gmx.de>
Tue, 27 Oct 2020 19:25:23 +0000 (20:25 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Tue, 27 Oct 2020 19:26:44 +0000 (20:26 +0100)
commita764c40079a493826a3678174f908941a383644e
treeeff05b3657ffb0042a50173a631b38a445b951f0
parentedea991d2ca520906e7a9581248db5eb96b20ac2
PR fortran/97491 - Wrong restriction for VALUE arguments of pure procedures

A dummy argument with the VALUE attribute may be redefined in a PURE or
ELEMENTAL procedure.  Adjust the associated purity check.

gcc/fortran/ChangeLog:

* resolve.c (gfc_impure_variable): A dummy argument with the VALUE
attribute may be redefined without making a procedure impure.

gcc/testsuite/ChangeLog:

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