Message ID | 545349C4.9070404@partner.samsung.com |
---|---|
State | New |
Headers | show |
On 10/31/2014 11:35 AM, Maxim Ostapenko wrote: > Hi, > > this tiny patch fixes PR63696 (alloc-dealloc-mismatch in ipa-icf.c). > > Tested on x86_64-unknown-linux-gnu, ok to commit? Could you add PR comment to ChangeLog? -Y
On Fri, Oct 31, 2014 at 9:35 AM, Maxim Ostapenko <m.ostapenko@partner.samsung.com> wrote: > Hi, > > this tiny patch fixes PR63696 (alloc-dealloc-mismatch in ipa-icf.c). > > Tested on x86_64-unknown-linux-gnu, ok to commit? Ok with referencing the PR from the changelog. Thanks, Richard. > -Maxim
gcc/ChangeLog: 2014-10-31 Max Ostapenko <m.ostapenko@partner.samsung.com> * ipa-icf.c (sem_function::~sem_function): Change free to delete to avoid alloc-dealloc mismatch with new, called in ipa_icf::sem_function::init. diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 975894b..a278a62 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -216,7 +216,7 @@ sem_function::sem_function (cgraph_node *node, hashval_t hash, sem_function::~sem_function () { for (unsigned i = 0; i < bb_sorted.length (); i++) - free (bb_sorted[i]); + delete (bb_sorted[i]); arg_types.release (); bb_sizes.release ();