[PATCH] PR fortran/97491 - Wrong restriction for VALUE arguments of pure procedures

Harald Anlauf anlauf@gmx.de
Mon Oct 26 20:59:09 GMT 2020


As found/reported by Thomas, the redefinition of dummy arguments with the
VALUE attribute was erroneously rejected for pure procedures.  A related
purity check did not take VALUE into account and was therefore adjusted.

Regtested on x86_64-pc-linux-gnu.

OK for master?

Thanks,
Harald


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr97491.patch
Type: text/x-patch
Size: 969 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201026/ca687939/attachment-0001.bin>


More information about the Gcc-patches mailing list