https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115700
--- Comment #12 from Paul Thomas <pault at gcc dot gnu.org> --- (In reply to GCC Commits from comment #11) > The master branch has been updated by Paul Thomas <pa...@gcc.gnu.org>: > > https://gcc.gnu.org/g:159fb203231c503418e7ab9f45282957e40cb195 > > commit r15-4793-g159fb203231c503418e7ab9f45282957e40cb195 > 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. Having committed this patch, I have just noticed the commented out lines in associate_69.f90. Mea culpa, mea maxima culpa - this part is still not fixed :-( However, this new path touches the right place. Paul