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

--- Comment #8 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:8ed729d68d2b8f2207054915ae3dca15a5ff75c0

commit r17-6426-g8ed729d68d2b8f2207054915ae3dca15a5ff75c0
Author: Jerry DeLisle <[email protected]>
Date:   Tue Nov 17 13:06:00 2026 -0800

    fortran: [PR128691] ICE for vector subscript on CHARACTER TARGET dummy

    gfc_conv_expr_descriptor describes a CHARACTER subreference array by a
    new descriptor instead of copying it to a temporary, but that code cannot
    describe a vector subscript and asserts.  Since r17-3342 every
    assumed-shape CHARACTER TARGET dummy counts as a subreference array, so a
    vector-subscripted section of one of rank two or more reached it; a
    CHARACTER pointer to an array of components already could.  Make a
    temporary for any expression with a vector subscript.

    Assisted-by: Claude Opus 5.5

            PR fortran/128691

    gcc/fortran/ChangeLog:

            * trans-array.cc (gfc_conv_expr_descriptor): Do not treat an
            expression with a vector subscript as a subreference array target.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/pr128691.f90: New test.

Reply via email to