diff options
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r-- | gcc/ipa-split.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index e3db78f5c05..e7d469d7442 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -1309,7 +1309,9 @@ split_function (struct split_point *split_point) so return slot optimization is always possible. Moreover this is required to make DECL_BY_REFERENCE work. */ if (aggregate_value_p (DECL_RESULT (current_function_decl), - TREE_TYPE (current_function_decl))) + TREE_TYPE (current_function_decl)) + && (!is_gimple_reg_type (TREE_TYPE (DECL_RESULT (current_function_decl))) + || DECL_BY_REFERENCE (DECL_RESULT (current_function_decl)))) gimple_call_set_return_slot_opt (call, true); /* Update return value. This is bit tricky. When we do not return, |