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? Thanks, Harald Fortran - simplify length of substring with constant bounds gcc/fortran/ChangeLog: PR fortran/100950 * simplify.c (substring_has_constant_len): New. (gfc_simplify_len): Handle case of substrings with constant bounds. gcc/testsuite/ChangeLog: PR fortran/100950 * gfortran.dg/pr100950.f90: New test.