[PATCH] PR fortran/99205 - [10/11 Regression] Out of memory with undefined character length

Harald Anlauf anlauf@gmx.de
Tue Mar 9 19:45:00 GMT 2021


Dear all,

character variables with undefined length are not allowed as
objects in DATA statements.  We better reject them.

Regtested on x86_64-pc-linux-gnu.  OK for master / backport?

Thanks,
Harald


PR fortran/99205 - Out of memory with undefined character length

A variable that is a data statement object shall be a designator,
thus a character variable shall have a constant length.

gcc/fortran/ChangeLog:

	PR fortran/99205
	* data.c (gfc_assign_data_value): Reject non-constant character
	length for lvalue.

gcc/testsuite/ChangeLog:

	PR fortran/99205
	* gfortran.dg/pr99205.f90: New test.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr99205.patch
Type: text/x-patch
Size: 1134 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210309/a425753d/attachment.bin>


More information about the Gcc-patches mailing list