https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123181
--- Comment #2 from Alfred Agrell <blubban at gmail dot com> --- > I read the abi differently and it is about at function boundaries. That certainly would be more intuitive, but the docs look clear enough to me: > The stack pointer must remain 16-byte aligned in any region of code that > isn't part of an epilog or prolog, except within leaf functions. https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170#unwindability Though it certainly is rare for such subtle ABI contradictions to actually cause trouble. Especially considering how rare -Oz is. > There is no mention there cant be more than one prologue Good point, I believe Microsoft calls that a shrinkwrapped function. But prologues must be tagged as such in pdata/xdata, and that'd cost more bytes than the optimization saves.
