https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79416
Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P2 |P3 CC| |jason at gcc dot gnu.org Summary|[5/6/7 Regression] Internal |Internal compiler error for |compiler error for |recursive template |recursive template |expansion |expansion | --- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> --- This is about running out of stack, instantiating a ridiculous number of functions that call each other. The error Martin sees in comment 1 is because the old default instantiation limit of 500 was lower than the 800 instantiations the testcase wants to make of the 'nops' functions; since the limit was raised to 900, we succeed in instantiating them, but then crash running out of stack during ggc_collect. Comment 2 demonstrates that we can get the same crash on older GCC by lowering the number of instantiations the testcase requires, so this really isn't a regression. A simple fix for the crash would be to raise the stack limit; doubling the amount requested in the call to stack_limit_increase from toplev::main (from 64MB to 128MB) allows the testcase to proceed. A difficult fix for the crash would be to reduce the stack consumption of the GGC machinery.