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

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

https://gcc.gnu.org/g:692ca18d491ec2337f50a1788866106dcb597901

commit r16-6341-g692ca18d491ec2337f50a1788866106dcb597901
Author: Harald Anlauf <[email protected]>
Date:   Mon Dec 22 21:05:29 2025 +0100

    Fortran: fix variable definition context checks for SELECT TYPE [PR123253]

    Commit r16-6300 introduced a regression when checking the variable
    definition context of SELECT TYPE variables where the selector was not a
    dummy argument as the scan for the association target was too shallow.
    Scan through association lists for the ultimate selector.

            PR fortran/123253

    gcc/fortran/ChangeLog:

            * expr.cc (gfc_check_vardef_context): Replace simple check by a
            scan through the association targets for a dummy argument.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/associate_76.f90: Extended testcase.
            * gfortran.dg/associate_77.f90: New test.

Reply via email to