diff options
author | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-04 21:11:04 +0000 |
---|---|---|
committer | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-04 21:11:04 +0000 |
commit | 2da26d04b57cb2e758fef6ce316151c6157f5549 (patch) | |
tree | 66c55eb5136f95f1adbef64e69d922fc0b3b6a35 /gcc/toplev.c | |
parent | e2971c54d58d98b11b49fccfc7343e6acff97195 (diff) | |
download | gcc-2da26d04b57cb2e758fef6ce316151c6157f5549.tar.gz |
PR jit/63854: Fix leak of ipa hooks
gcc/ChangeLog:
PR jit/63854
* ipa-prop.c (ipa_register_cgraph_hooks): Guard insertion of
ipa_add_new_function on function_insertion_hook_holder being
non-NULL.
* ipa-reference.c (ipa_reference_c_finalize): Remove
node_removal_hook_holder and node_duplication_hook_holder if
they've been added to symtab.
* toplev.c (toplev::finalize): Call ipa_reference_c_finalize
before cgraph_c_finalize so that the former can access "symtab".
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218403 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 2f547bfd951..911084db375 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2163,12 +2163,14 @@ toplev::finalize (void) rtl_initialized = false; this_target_rtl->target_specific_initialized = false; + /* Needs to be called before cgraph_c_finalize since it uses symtab. */ + ipa_reference_c_finalize (); + cgraph_c_finalize (); cgraphunit_c_finalize (); dwarf2out_c_finalize (); gcse_c_finalize (); ipa_cp_c_finalize (); - ipa_reference_c_finalize (); ira_costs_c_finalize (); params_c_finalize (); |