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

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

https://gcc.gnu.org/g:416b1412071a397e3f38f72b49d0e2f5e84d1f0b

commit r16-9110-g416b1412071a397e3f38f72b49d0e2f5e84d1f0b
Author: Jerry DeLisle <[email protected]>
Date:   Tue Jun 9 09:46:30 2026 -0700

    fortran: ICE for ASSOCIATE selector that is an overloaded intrinsic
operator

    Add a fallback branch in match_association_list that, for any remaining
    unresolved EXPR_OP selector with BT_UNKNOWN type, calls gfc_extend_expr
    to resolve the overloaded operator to its function call early, so the
    associate name receives a usable type before the body is parsed.  The
    INTRINSIC_USER path is unchanged.

    Assisted-by: Claude Sonnet 4.6

            PR fortran/125650

    gcc/fortran/ChangeLog:

            * match.cc (match_association_list): Handle ASSOCIATE selectors
            that are overloaded intrinsic operator expressions by extending
            them with gfc_extend_expr at parse time, so the associate name is
            typed before the construct body is parsed.

    gcc/testsuite/ChangeLog:

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

    (cherry picked from commit 939e277254c1fb0a77a321827598352209bff5e6)

Reply via email to