diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-19 11:57:41 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-19 11:57:41 +0000 |
commit | 72a985d7375713a81ebfaf6e9f34ed6241f629e7 (patch) | |
tree | f304db9cdc8550c316d6ea4709de8f5b53d0d35d /gcc/cgraphunit.c | |
parent | bcd3678db9fd88221d9f5974750a2514a3f2cff8 (diff) | |
download | gcc-72a985d7375713a81ebfaf6e9f34ed6241f629e7.tar.gz |
PR lto/69133
* cgraphunit.c (cgraph_node::expand_thunk): When forcing gimple
assume that the node has body.
* cgraph.c (cgraph_node::get_untransformed_body): Use gimple_body_p
check.
* g++.dg/lto/pr69133_0.C: New testcase.
* g++.dg/lto/pr69133_1.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232552 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 950f6c5c917..2c49d7b0ac5 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1664,7 +1664,9 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk) greturn *ret; bool alias_is_noreturn = TREE_THIS_VOLATILE (alias); - if (in_lto_p) + /* We may be called from expand_thunk that releses body except for + DECL_ARGUMENTS. In this case force_gimple_thunk is true. */ + if (in_lto_p && !force_gimple_thunk) get_untransformed_body (); a = DECL_ARGUMENTS (thunk_fndecl); |