aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2013-09-07 09:48:59 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2013-09-07 07:48:59 +0000
commitbcb650cbb87954272436b03e1cccf795ec7e777a (patch)
treedca52c1b4bd1b08e703705b2b1f193548cf0e483 /gcc/cgraphunit.c
parent2ef38fa0f3bbc48ae8588f8e32238ab176bb1d26 (diff)
downloadgcc-bcb650cbb87954272436b03e1cccf795ec7e777a.zip
gcc-bcb650cbb87954272436b03e1cccf795ec7e777a.tar.gz
gcc-bcb650cbb87954272436b03e1cccf795ec7e777a.tar.bz2
cgraphunit.c (expand_thunk): Get body before touching arguments.
* 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
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 08e0ff2..1afdd43 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1433,7 +1433,11 @@ expand_thunk (struct cgraph_node *node)
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;