https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126018
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Jerry DeLisle <[email protected]>: https://gcc.gnu.org/g:dc6796eef9e14a9d28df033ccb10b75563c4ba62 commit r15-11344-gdc6796eef9e14a9d28df033ccb10b75563c4ba62 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)
