https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90568
--- Comment #1 from Peter Cordes <peter at cordes dot ca> --- https://godbolt.org/z/hHCVTc Forgot to mention, stack-protector also disables use of the red-zone for no apparent reason, so that's another missed optimization. (Perhaps rarely relevant; probably most functions that get stack protection are big enough that they need more stack, or non-leaf. I sidestepped that with volatile.)