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

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

https://gcc.gnu.org/g:ea52b53ad8fe0025f973a70e32d32a6e9d342ca6

commit r17-4768-gea52b53ad8fe0025f973a70e32d32a6e9d342ca6
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.

Reply via email to