aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2004-08-10 14:02:18 -0400
committerJason Merrill <jason@gcc.gnu.org>2004-08-10 14:02:18 -0400
commit01c985700000ecfa510dde907812cb389d28695e (patch)
treebd5fa967739eadee9c3a8b80490cbd81f107cd2a /gcc/function.c
parentb2ddaebb2d8528b8f53a6546ed8988057771b832 (diff)
downloadgcc-01c985700000ecfa510dde907812cb389d28695e.zip
gcc-01c985700000ecfa510dde907812cb389d28695e.tar.gz
gcc-01c985700000ecfa510dde907812cb389d28695e.tar.bz2
function.c (expand_function_start): Handle DECL_BY_REFERENCE on the RESULT_DECL.
* function.c (expand_function_start): Handle DECL_BY_REFERENCE on the RESULT_DECL. From-SVN: r85763
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/function.c b/gcc/function.c
index ed7821b..e59f002 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4005,8 +4005,12 @@ expand_function_start (tree subr)
}
if (value_address)
{
- rtx x = gen_rtx_MEM (DECL_MODE (DECL_RESULT (subr)), value_address);
- set_mem_attributes (x, DECL_RESULT (subr), 1);
+ rtx x = value_address;
+ if (!DECL_BY_REFERENCE (DECL_RESULT (subr)))
+ {
+ x = gen_rtx_MEM (DECL_MODE (DECL_RESULT (subr)), x);
+ set_mem_attributes (x, DECL_RESULT (subr), 1);
+ }
SET_DECL_RTL (DECL_RESULT (subr), x);
}
}