From: Jan Hubicka Date: Fri, 7 Feb 2014 23:47:17 +0000 (+0100) Subject: * lto.c (unify_scc): Free CONSTRUCTOR_ELTS. X-Git-Tag: releases/gcc-4.9.0~1006 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b7e85694cf4baa17e0b9c43a640f4e0ca9870c46;p=thirdparty%2Fgcc.git * lto.c (unify_scc): Free CONSTRUCTOR_ELTS. From-SVN: r207619 --- diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index db7b030e5ab5..94d19ee78bc7 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,7 @@ +2014-02-06 Jan Hubicka + + * lto.c (unify_scc): Free CONSTRUCTOR_ELTS. + 2014-02-06 Jan Hubicka PR ipa/59469 diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index fb81f3132f19..6f2428db5386 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -1807,8 +1807,12 @@ unify_scc (struct streamer_tree_cache_d *cache, unsigned from, /* Free the tree nodes from the read SCC. */ for (unsigned i = 0; i < len; ++i) { + enum tree_code code; if (TYPE_P (scc->entries[i])) num_merged_types++; + code = TREE_CODE (scc->entries[i]); + if (CODE_CONTAINS_STRUCT (code, TS_CONSTRUCTOR)) + vec_free (CONSTRUCTOR_ELTS (scc->entries[i])); ggc_free (scc->entries[i]); }