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]

[PATCH] Fix PR 23408


The problem here is that we call ggc_collect even though we have a reference to
a cgraph node in non gc memory after we remove it from the graph. I tried first to
change the array containing the reference to be in GC memory but that failed to
bootstrap as we crashed in gc while marking memory. I decided just to remove
the ggc_collect call which fixes the problem. I am also adding the testcase
so if someone adds back a ggc_collect, the testcase will fail. I did not
measure the memory usage because I did not think we created that much
Garbage while doing early inlining.


OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

Thanks,
Andrew Pinski

ChangeLog:

	* ipa-inline.c (cgraph_decide_inlining_incrementally): Remove the
	call to ggc_collect.

testsuite/ChangeLog:
	* gcc.dg/pr23408.c: New test.


Attachment: t2.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]