http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14179
--- Comment #64 from Jason Merrill <jason at gcc dot gnu.org> 2012-01-14 17:06:46 UTC --- Yep, it turned out that there was a lot of allocation overhead from vector allocation in the token buffer. After fixing that as well with the patch at http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00732.html this testcase is down to 967MB VM size. The only obvious area of improvement left is the 67MB of garbage from unnecessary reshape_init copying, which seems like more work than it's worth for this testcase, and definitely not something for 4.7.