https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113140
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Eric Botcazou <ebotca...@gcc.gnu.org>: https://gcc.gnu.org/g:6ddc3fe23ede844454584bc3699f879d3694a382 commit r13-8201-g6ddc3fe23ede844454584bc3699f879d3694a382 Author: Eric Botcazou <ebotca...@adacore.com> Date: Tue Jan 9 10:14:29 2024 +0100 Fix segfault during delay slot scheduling pass This is a small regression present on the mainline and 13 branch, although the underlying problem has probably been there for ages, in the form of a segfault during the delay slot scheduling pass, for a function that falls through to exit without any instruction generated for the end of function. gcc/ PR rtl-optimization/113140 * reorg.cc (fill_slots_from_thread): If we are to branch after the last instruction of the function, create an end label. gcc/testsuite/ * g++.dg/opt/delay-slot-2.C: New test.