https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111783
Bug ID: 111783
Summary: 'exit' intrinsic should be marked as
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
Target Milestone: ---
Compiling testsuite/gfortran.dg/team_number_1.f90 with -O3 produces the
following optimized dump:
_gfortran_exit_i4 (0);
_gfortran_exit_i4 (0);
_gfortran_stop_numeric (2, 0);
}
The last three statements could be removed as the 'EXIT' intrinsic subroutine
is known not to return.
Thus, we should set
ATTR_NORETURN_NOTHROW_LIST
(cf. fortran/f95-lang.cc).
There are probably more, at least the ABORT intrinsic subroutine and
the functions associated with STOP / ERROR STOP like _gfortran_stop_numeric.