diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-02-10 15:06:20 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-02-10 15:06:20 +0000 |
commit | e5d1ea319e04039a041a128ab3ab108ba990fc4a (patch) | |
tree | d04fa6cffeb76dd4444658f8e2f8360ed9d03342 /gcc/cgraphunit.c | |
parent | fa03b19dbb6b95e1aced217b1b6fdaf19e640a3f (diff) | |
download | gcc-e5d1ea319e04039a041a128ab3ab108ba990fc4a.tar.gz |
PR ipa/69241
PR c++/69649
* gimplify.c (gimplify_modify_expr): Set lhs even for noreturn
calls if the return type is TREE_ADDRESSABLE.
* cgraphunit.c (cgraph_node::expand_thunk): Likewise.
* ipa-split.c (split_function): Fix doubled "we" in comment.
Use void return type for the split part even if
!split_point->split_part_set_retval.
* g++.dg/ipa/pr69241-1.C: New test.
* g++.dg/ipa/pr69241-2.C: New test.
* g++.dg/ipa/pr69241-3.C: New test.
* g++.dg/ipa/pr69649.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233271 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 2c49d7b0ac5..0a745f0f473 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1701,7 +1701,8 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk) bsi = gsi_start_bb (bb); /* Build call to the function being thunked. */ - if (!VOID_TYPE_P (restype) && !alias_is_noreturn) + if (!VOID_TYPE_P (restype) + && (!alias_is_noreturn || TREE_ADDRESSABLE (restype))) { if (DECL_BY_REFERENCE (resdecl)) { @@ -1768,7 +1769,7 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk) || DECL_BY_REFERENCE (resdecl))) gimple_call_set_return_slot_opt (call, true); - if (restmp && !alias_is_noreturn) + if (restmp) { gimple_call_set_lhs (call, restmp); gcc_assert (useless_type_conversion_p (TREE_TYPE (restmp), |