diff options
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/function.c b/gcc/function.c index 7fa3b0c..0c4d5f8 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -2253,10 +2253,11 @@ assign_parms_augmented_arg_list (struct assign_parm_data_all *all) tree decl; decl = build_decl (DECL_SOURCE_LOCATION (fndecl), - PARM_DECL, NULL_TREE, type); + PARM_DECL, get_identifier (".result_ptr"), type); DECL_ARG_TYPE (decl) = type; DECL_ARTIFICIAL (decl) = 1; - DECL_IGNORED_P (decl) = 1; + DECL_NAMELESS (decl) = 1; + TREE_CONSTANT (decl) = 1; DECL_CHAIN (decl) = all->orig_fnargs; all->orig_fnargs = decl; @@ -3418,13 +3419,22 @@ assign_parms (tree fndecl) rtx x; if (DECL_BY_REFERENCE (result)) - x = addr; + { + SET_DECL_VALUE_EXPR (result, all.function_result_decl); + x = addr; + } else { + SET_DECL_VALUE_EXPR (result, + build1 (INDIRECT_REF, TREE_TYPE (result), + all.function_result_decl)); addr = convert_memory_address (Pmode, addr); x = gen_rtx_MEM (DECL_MODE (result), addr); set_mem_attributes (x, result, 1); } + + DECL_HAS_VALUE_EXPR_P (result) = 1; + SET_DECL_RTL (result, x); } |