aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/expr.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-02-04 01:29:33 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-02-03 20:29:33 -0500
commit2a66ec2b80cb3c613d567f734d523d2671fe74cd (patch)
treeca9881720c3140ebaab62c44b0168a87168c80ac /gcc/cp/expr.c
parent82bf778342ec221fdaf525e0841682d99d1ad529 (diff)
downloadgcc-2a66ec2b80cb3c613d567f734d523d2671fe74cd.zip
gcc-2a66ec2b80cb3c613d567f734d523d2671fe74cd.tar.gz
gcc-2a66ec2b80cb3c613d567f734d523d2671fe74cd.tar.bz2
expr.c (cplus_expand_expr, [...]): Call convert_from_reference sooner.
* expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code): Call convert_from_reference sooner. From-SVN: r17659
Diffstat (limited to 'gcc/cp/expr.c')
-rw-r--r--gcc/cp/expr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c
index a275c8e..47d50e9 100644
--- a/gcc/cp/expr.c
+++ b/gcc/cp/expr.c
@@ -140,6 +140,7 @@ cplus_expand_expr (exp, target, tmode, modifier)
tree init = build_decl (VAR_DECL, NULL_TREE,
build_reference_type (type));
DECL_RTL (init) = XEXP (return_target, 0);
+ init = convert_from_reference (init);
flag_access_control = 0;
expand_aggr_init (slot, init, 0, LOOKUP_ONLYCONVERTING);
@@ -147,7 +148,7 @@ cplus_expand_expr (exp, target, tmode, modifier)
if (TYPE_NEEDS_DESTRUCTOR (type))
{
- init = maybe_build_cleanup (convert_from_reference (init));
+ init = maybe_build_cleanup (init);
if (init != NULL_TREE)
expand_expr (init, const0_rtx, VOIDmode, 0);
}