expr.c (cplus_expand_expr, [...]): Call convert_from_reference sooner.
authorJason Merrill <jason@yorick.cygnus.com>
Wed, 4 Feb 1998 01:29:33 +0000 (01:29 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 4 Feb 1998 01:29:33 +0000 (20:29 -0500)
* expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
Call convert_from_reference sooner.

From-SVN: r17659

gcc/cp/ChangeLog
gcc/cp/expr.c

index d7086dcb1660dc60f2ea8c76df8dd92a24d6e504..fd58776fe611fd0fb6b958d864ca256fd31b3856 100644 (file)
@@ -1,3 +1,8 @@
+Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
+       Call convert_from_reference sooner.
+
 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
 
        * cvt.c (ocp_convert): Obtain the constant values from constant
index a275c8ed5b9090a280bb5cbdae9aa05cd6ec0c59..47d50e9ababcfdba47d45217038cee1be7624aa9 100644 (file)
@@ -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);
              }