https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111107
--- Comment #17 from Zeb Figura <zfigura at codeweavers dot com> --- Actually, for that matter, what is the intended purpose of -mstackrealign? How is it supposed to differ from -mincoming-stack-boundary and -mpreferred-stack-boundary? The documentation is kind of unclear; it "realigns the stack at entry [...] if necessary", which sounds like it could be synonymous with -mincoming-stack-boundary or -mpreferred-stack-boundary. But the mechanism in the code seems to be entirely separate, and it's also broken with -mavx512f (bug 110273). From some quick testing it also seems to be broken with aligned(8), though not aligned(16). That seems to be due to the logic at [1]; not sure if that was intentional but I'll admit it doesn't make much sense to me. But I also don't see why this mechanism is used instead of whatever mechanism is used for -mincoming-stack-boundary. [1] https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/i386/i386.cc;h=9390f525b99f0c078c912876aee8498bc3e7701b;hb=HEAD#l7768