]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Fix problem with substring selectors in ASSOCIATE [PR115700]
authorPaul Thomas <pault@gcc.gnu.org>
Thu, 31 Oct 2024 07:22:36 +0000 (07:22 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Thu, 14 Nov 2024 11:09:01 +0000 (11:09 +0000)
commitcaa2b2038dadcb545f825d5c736cc50d90245bbc
tree2e5f6dbae6a633d40268d2b8a8ceff3e4661f286
parent39b0fb9bbcf49fc7a7c97c9efbc4453e1593b536
Fortran: Fix problem with substring selectors in ASSOCIATE [PR115700]

2024-10-31  Paul Thomas  <pault@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)
gcc/fortran/resolve.cc
gcc/testsuite/gfortran.dg/associate_70.f90 [new file with mode: 0644]