https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127187

--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Jerry DeLisle
<[email protected]>:

https://gcc.gnu.org/g:508755467c829a9098e445ce0c36edd47a42c3dc

commit r15-11602-g508755467c829a9098e445ce0c36edd47a42c3dc
Author: Jerry DeLisle <[email protected]>
Date:   Tue Sep 29 10:04:39 2026 -0700

    fortran: [PR127187] Type parameter inquiry selector is not a variable

    A selector that is a LEN or KIND type parameter inquiry, e.g. s%len, was
    treated as a variable, so the associate-name pointed to the string length
    of s and followed later changes of it.  On targets where the charlen type
    is default INTEGER, associate_90.f90 failed with ERROR STOP 8.

    Assisted-by: Claude Opus 5.5

            PR fortran/127187

    gcc/fortran/ChangeLog:

            * resolve.cc (resolve_assoc_var): A selector with a LEN or KIND
            inquiry reference is not a variable.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/associate_90.f90: Add -fdump-tree-original and check
            that no associate-name points to a string length.

    (cherry picked from commit ea52b53ad8fe0025f973a70e32d32a6e9d342ca6)

Reply via email to