https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115700
--- Comment #21 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Paul Thomas <pa...@gcc.gnu.org>: https://gcc.gnu.org/g:b706a96cdfe5a8bce6d79cba14be5f563cb69f4b commit r13-9188-gb706a96cdfe5a8bce6d79cba14be5f563cb69f4b Author: Paul Thomas <pa...@gcc.gnu.org> Date: Thu Oct 31 07:22:36 2024 +0000 Fortran: Fix problem with substring selectors in ASSOCIATE [PR115700] 2024-10-31 Paul Thomas <pa...@gcc.gnu.org> gcc/fortran PR fortran/115700 * resolve.cc (resolve_variable): The typespec of an expression, which is not a substring, can be shared with a deferred length associate name. (resolve_assoc_var): Extract a substring reference with non- constant start or end. Use it to flag up the need for array associate name to be a pointer. (resolve_block_construct): Change comment from past to future tense. gcc/testsuite/ PR fortran/115700 * gfortran.dg/associate_70.f90: New test. (cherry picked from commit 159fb203231c503418e7ab9f45282957e40cb195)