aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2016-01-19 12:57:41 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2016-01-19 11:57:41 +0000
commite9191ad3ab89826936060c5e13800ce6be4f650c (patch)
treef304db9cdc8550c316d6ea4709de8f5b53d0d35d /gcc/cgraphunit.c
parent150be262b98a8601cbc470c789c5b7b0907ddfb4 (diff)
downloadgcc-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/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 950f6c5..2c49d7b 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);