https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71330
Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ppalka at gcc dot gnu.org --- Comment #10 from Patrick Palka <ppalka at gcc dot gnu.org> --- I think the problem is with cp_fold_function() which does cp_walk_tree (&DECL_SAVED_TREE (fndecl), cp_fold_r, NULL, NULL); and cp_fold_r is itself recursive so the number of calls made to cp_fold_r via cp_fold_function() is quadratic with respect to the size of the function's subexpressions. The test case features a huge subexpression arising from the chain of overloaded <<s.