* cgraphunit.c (expand_thunk): Get body before touching arguments.
* lto-streamer-out.c: Stream thunks, too.
* lto-streamer-in.c (input_function): Pop cfun here
(lto_read_body): Instead of here.
From-SVN: r202352
+2013-09-06 Jan Hubicka <jh@suse.cz>
+
+ * cgraphunit.c (expand_thunk): Get body before touching arguments.
+ * lto-streamer-out.c: Stream thunks, too.
+ * lto-streamer-in.c (input_function): Pop cfun here
+ (lto_read_body): Instead of here.
+
2013-09-06 Caroline Tice <cmtice@google.com>
* doc/install.texi: Add documentation for the --enable-vtable-verify
tree virtual_offset = NULL;
tree alias = node->callees->callee->symbol.decl;
tree thunk_fndecl = node->symbol.decl;
- tree a = DECL_ARGUMENTS (thunk_fndecl);
+ tree a;
+
+ if (in_lto_p)
+ cgraph_get_body (node);
+ a = DECL_ARGUMENTS (thunk_fndecl);
current_function_decl = thunk_fndecl;
free_dominance_info (CDI_DOMINATORS);
free_dominance_info (CDI_POST_DOMINATORS);
free (stmts);
+ pop_cfun ();
}
/* Restore decl state */
file_data->current_decl_state = file_data->global_decl_state;
-
- pop_cfun ();
}
lto_data_in_delete (data_in);
cgraph_node *node = dyn_cast <cgraph_node> (snode);
if (node
&& lto_symtab_encoder_encode_body_p (encoder, node)
- && !node->symbol.alias
- && !node->thunk.thunk_p)
+ && !node->symbol.alias)
{
#ifdef ENABLE_CHECKING
gcc_assert (!bitmap_bit_p (output, DECL_UID (node->symbol.decl)));