diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2016-01-19 12:57:41 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2016-01-19 11:57:41 +0000 |
commit | e9191ad3ab89826936060c5e13800ce6be4f650c (patch) | |
tree | f304db9cdc8550c316d6ea4709de8f5b53d0d35d /gcc/cgraph.c | |
parent | 150be262b98a8601cbc470c789c5b7b0907ddfb4 (diff) | |
download | gcc-e9191ad3ab89826936060c5e13800ce6be4f650c.zip gcc-e9191ad3ab89826936060c5e13800ce6be4f650c.tar.gz gcc-e9191ad3ab89826936060c5e13800ce6be4f650c.tar.bz2 |
re PR lto/69133 (LTO segfault in lto_get_decl_name_mapping() on 483.xalancbmk with -flto-partition=none)
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.
From-SVN: r232552
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 0d70904..5331f7f 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -3305,10 +3305,12 @@ cgraph_node::get_untransformed_body (void) size_t len; tree decl = this->decl; - if (DECL_RESULT (decl)) + /* Check if body is already there. Either we have gimple body or + the function is thunk and in that case we set DECL_ARGUMENTS. */ + if (DECL_ARGUMENTS (decl) || gimple_has_body_p (decl)) return false; - gcc_assert (in_lto_p); + gcc_assert (in_lto_p && !DECL_RESULT (decl)); timevar_push (TV_IPA_LTO_GIMPLE_IN); |