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

--- Comment #6 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:b6de3eb243c91b6503d95cc1942f55378ae6cbae

commit r17-2099-gb6de3eb243c91b6503d95cc1942f55378ae6cbae
Author: Jerry DeLisle <[email protected]>
Date:   Wed Jul 1 14:03:23 2026 -0700

    fortran: [PR126018] Fix rejects character function invocation as stop code

    Expressions used in stop codes can be functions as long as they resolve to
    integer or character.

            PR fortran/126018

    gcc/fortran/ChangeLog:

            * match.cc (gfc_match_stopcode): Adjust the f2008 error check.If
the
            STOP code expr type is unknown, do not error. It will be checked in
            gfc_resolve_code.
            * resolve.cc (gfc_resolve_code): Add checks for EXEC_STOP and
            EXEC_ERROR_STOP.

    gcc/testsuite/ChangeLog:

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

Reply via email to