aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 49a5850..8f945b8 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -6367,6 +6367,8 @@ tree_function_versioning (tree old_decl, tree new_decl,
tree resdecl_repl = copy_result_decl_to_var (DECL_RESULT (old_decl),
&id);
declare_inline_vars (NULL, resdecl_repl);
+ if (DECL_BY_REFERENCE (DECL_RESULT (old_decl)))
+ resdecl_repl = build_fold_addr_expr (resdecl_repl);
insert_decl_map (&id, DECL_RESULT (old_decl), resdecl_repl);
DECL_RESULT (new_decl)