aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2014-02-08 00:47:17 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2014-02-07 23:47:17 +0000
commitb7e85694cf4baa17e0b9c43a640f4e0ca9870c46 (patch)
tree75a450f9b7a4617a18aef7d4c19e478eefcbe05c /gcc/lto
parent8c311b50d191ce5aa3574264d4e0cbe604cdcbc7 (diff)
downloadgcc-b7e85694cf4baa17e0b9c43a640f4e0ca9870c46.zip
gcc-b7e85694cf4baa17e0b9c43a640f4e0ca9870c46.tar.gz
gcc-b7e85694cf4baa17e0b9c43a640f4e0ca9870c46.tar.bz2
* lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
From-SVN: r207619
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog4
-rw-r--r--gcc/lto/lto.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index db7b030..94d19ee 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,5 +1,9 @@
2014-02-06 Jan Hubicka <hubicka@ucw.cz>
+ * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
+
+2014-02-06 Jan Hubicka <hubicka@ucw.cz>
+
PR ipa/59469
* lto-partition.c (symbol_class): Move to cgraph.h
(get_symbol_class): Move to symtab.c
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index fb81f31..6f2428d 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]);
}