http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56746
--- Comment #7 from Mathias Gaunard <mathias at gaunard dot com> 2013-03-28 10:39:53 UTC --- Using either -save-temps or -ftrack-macro-expansion=0-ftrack-macro-expansion=0 removes the memory hog. Compiling the preprocessed source does not cause increased memory usage. So it seems the macro expansion tracking is what's causing a lot of extra memory usage here.