https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121424
--- Comment #2 from J. Ryan Stinnett <jryans at gmail dot com> --- (I should have stated up front I was initially testing -O1, apologies...) Ah yes, when I check GCC 16 at -O2 (https://godbolt.org/z/f8TcxEzTY), indeed it does the right thing, keeping the return as part of the caller's instruction range. Curiously, the GCC 14 series at -O2 (https://godbolt.org/z/jc11dr6cG) has the bad behaviour, so something "fixed" this (for -O2 only) starting with GCC 15. I wonder if there were any optimisation pipeline changes at the -O2 level in GCC 15...?