https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79198

--- Comment #6 from Martin Jambor <jamborm at gcc dot gnu.org> ---
I am about to test the following, which fixes the test from comment
#1.  It does fix a clear bug in the patch I committed today, without
it there we multitudes of identical cgraph duplication hooks active at
the same time.

What worries me is that I cannot ggc_free the memory the structure
sits on without getting a seemingly random segfault later.  But
yesterday the structure was not allocated from GC and was freed here,
so its address shouldn't really escape anywhere...


diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 512bcbed0cb..22cd61f3b18 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -3574,6 +3574,7 @@ ipa_free_all_edge_args (void)
 void
 ipa_free_all_node_params (void)
 {
+  ipa_node_params_sum->~ipa_node_params_t ();
   ipa_node_params_sum = NULL;
 }

Reply via email to