This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
The problem here is that we call ggc_collect during the un-nesting of the nested functions which causes us to free the new allocated type. Removing the ggc_collect is hard as that would mean removing it from all the lowering passes which is not really wanted at all. This fixes the problem by allocating nesting_info in GC memory instead.
I tried to mark var_map as skip so we could allocate it in the heap as all of those trees would already be referenced by gengtype would not allow me too for some reason, oh well.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. I tried to bootstrap and test Ada but even without my patch, all the Ada tests fail, this did not happen a couple of days ago though.
Thanks, Andrew Pinski
testsuite/ChangeLog: * gcc.dg/pr23547.c: New test.
Attachment:
t.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |