http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53525
--- Comment #7 from jimis <jimis at gmx dot net> 2012-05-30 06:01:23 UTC --- Now time for the most intrusive and problematic patches. I tried moving all virt_locs, expanded, expanded_virt_locs to obstacks for allocation. After many failures to work with obstacks as they are I had to introduce two new functions, obstack_{mark,release}(), that allow me to continue growing an older object by pushing and popping a special marker. Previous patches are included with the following, but I'm submitting it separately because it's WIP. Even though it is now stable, there is a bad memory leak that I don't know how to handle since I'm kind of lost in the macro-expansion code. I'd appreciate suggestions, just search for LEAK or TODO in my comments. :-p Please ignore whitespace changes (that are highlighted by emacs so I fix them) or stylistic changes in parts that I rewrote so many times that lost completely their initial style.