summaryrefslogtreecommitdiff
path: root/gcc/varpool.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-03-12 01:14:19 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2015-03-12 00:14:19 +0000
commit1c4db829238c99209ba210d36a4290cf0eb809ff (patch)
tree9f5abb5d1ef41104ac985a833791fcc67420ed66 /gcc/varpool.c
parent8648c55f3b703a0a824ae0815485dbebe4e01478 (diff)
cgraph.c (cgraph_node::release_body): Free function_in_decl_state.
* cgraph.c (cgraph_node::release_body): Free function_in_decl_state. (cgraph_node::remove): Likewise. (cgraph_node::get_untransformed_body): Likewise. * varpool.c (varpool_node::remove): Likewise. (varpool_node::get_constructor): Add sanity check. * lto.c (read_cgraph_and_symbols): Do not do merging at ltrans stage. From-SVN: r221366
Diffstat (limited to 'gcc/varpool.c')
-rw-r--r--gcc/varpool.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/varpool.c b/gcc/varpool.c
index 707f62f0d84..b5836934d72 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -195,6 +195,11 @@ void
varpool_node::remove (void)
{
symtab->call_varpool_removal_hooks (this);
+ if (lto_file_data)
+ {
+ lto_free_function_in_decl_state_for_node (this);
+ lto_file_data = NULL;
+ }
/* When streaming we can have multiple nodes associated with decl. */
if (symtab->state == LTO_STREAMING)
@@ -323,6 +328,7 @@ varpool_node::get_constructor (void)
name);
lto_input_variable_constructor (file_data, this, data);
+ gcc_assert (DECL_INITIAL (decl) != error_mark_node);
lto_stats.num_function_bodies++;
lto_free_section_data (file_data, LTO_section_function_body, name,
data, len);