https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85130
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:0fabf86a52c46db19026a956cf386da46fa4d0be commit r9-9738-g0fabf86a52c46db19026a956cf386da46fa4d0be Author: Harald Anlauf <anl...@gmx.de> Date: Mon Sep 13 19:26:35 2021 +0200 Fortran - fix handling of substring start and end indices gcc/fortran/ChangeLog: PR fortran/85130 * expr.c (find_substring_ref): Handle given substring start and end indices as signed integers, not unsigned. gcc/testsuite/ChangeLog: PR fortran/85130 * gfortran.dg/substr_6.f90: Revert commit r8-7574, adding again test that was erroneously considered as illegal. (cherry picked from commit 8d93ba93d3b13ac3d3c34404cad87732c809605b)