https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102577
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Also the code is correct just the stack limit is too small. This is not something which GCC can control directly. stack space is not specified in the C++ standard at all and I highly doubt it would ever be.