https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89483
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WONTFIX --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >-ftemplate-depth=1000000 You get what you get when you increase this value. And it is documented to maybe run out of stack space too: The default value is 900, as the compiler can run out of stack space before hitting 1024 in some situations.