[PATCH] PR fortran/100950 - ICE in output_constructor_regular_field, at varasm.c:5514

Harald Anlauf anlauf@gmx.de
Wed Jun 9 21:39:45 GMT 2021

Dear Fortranners,

we should be able to simplify the length of a substring with known
constant bounds.  The attached patch adds this.

Regtested on x86_64-pc-linux-gnu.

OK for mainline?  Since this should be rather safe, to at least 11-branch?


Fortran - simplify length of substring with constant bounds


	PR fortran/100950
	* simplify.c (substring_has_constant_len): New.
	(gfc_simplify_len): Handle case of substrings with constant


	PR fortran/100950
	* gfortran.dg/pr100950.f90: New test.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr100950.patch
Type: text/x-patch
Size: 3341 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210609/4aa89da5/attachment.bin>

More information about the Gcc-patches mailing list