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

--- Comment #7 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:168574d5f5c4fe7bef24b6e3b7027654b4b5e3ac

commit r16-9220-g168574d5f5c4fe7bef24b6e3b7027654b4b5e3ac
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.

    (cherry picked from commit b6de3eb243c91b6503d95cc1942f55378ae6cbae)

Reply via email to