]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
semantics.c (simplify_aggr_init_expr): Remove remnants of 2014-04-11 change.
authorJason Merrill <jason@redhat.com>
Mon, 30 Jun 2014 15:11:07 +0000 (11:11 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 30 Jun 2014 15:11:07 +0000 (11:11 -0400)
* semantics.c (simplify_aggr_init_expr): Remove remnants of
2014-04-11 change.

From-SVN: r212153

gcc/cp/ChangeLog
gcc/cp/semantics.c

index 6d5b43f193d22c70f48c15d4d53fe542aeec8a5f..b478cf739f801e8b52f7f6b8f02c14bb2cf48c67 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-30  Jason Merrill  <jason@redhat.com>
+
+       * semantics.c (simplify_aggr_init_expr): Remove remnants of
+       2014-04-11 change.
+
 2014-06-30  Marek Polacek  <polacek@redhat.com>
 
        * cp-gimplify.c (cp_genericize): Don't instrument returns if the
index 456df7b1bd8d3a2dd06a2d43f91e6e8e0ac2ac94..a6f5a4a413c32dfddbb7cd42ed92510283987e13 100644 (file)
@@ -3870,7 +3870,6 @@ simplify_aggr_init_expr (tree *tp)
                                    AGGR_INIT_EXPR_ARGP (aggr_init_expr));
   TREE_NOTHROW (call_expr) = TREE_NOTHROW (aggr_init_expr);
   CALL_EXPR_LIST_INIT_P (call_expr) = CALL_EXPR_LIST_INIT_P (aggr_init_expr);
-  tree ret = call_expr;
 
   if (style == ctor)
     {
@@ -3886,7 +3885,7 @@ simplify_aggr_init_expr (tree *tp)
         expand_call{,_inline}.  */
       cxx_mark_addressable (slot);
       CALL_EXPR_RETURN_SLOT_OPT (call_expr) = true;
-      ret = build2 (INIT_EXPR, TREE_TYPE (ret), slot, ret);
+      call_expr = build2 (INIT_EXPR, TREE_TYPE (call_expr), slot, call_expr);
     }
   else if (style == pcc)
     {
@@ -3894,11 +3893,11 @@ simplify_aggr_init_expr (tree *tp)
         need to copy the returned value out of the static buffer into the
         SLOT.  */
       push_deferring_access_checks (dk_no_check);
-      ret = build_aggr_init (slot, ret,
-                            DIRECT_BIND | LOOKUP_ONLYCONVERTING,
-                            tf_warning_or_error);
+      call_expr = build_aggr_init (slot, call_expr,
+                                  DIRECT_BIND | LOOKUP_ONLYCONVERTING,
+                                   tf_warning_or_error);
       pop_deferring_access_checks ();
-      ret = build2 (COMPOUND_EXPR, TREE_TYPE (slot), ret, slot);
+      call_expr = build2 (COMPOUND_EXPR, TREE_TYPE (slot), call_expr, slot);
     }
 
   if (AGGR_INIT_ZERO_FIRST (aggr_init_expr))
@@ -3906,10 +3905,11 @@ simplify_aggr_init_expr (tree *tp)
       tree init = build_zero_init (type, NULL_TREE,
                                   /*static_storage_p=*/false);
       init = build2 (INIT_EXPR, void_type_node, slot, init);
-      ret = build2 (COMPOUND_EXPR, TREE_TYPE (ret), init, ret);
+      call_expr = build2 (COMPOUND_EXPR, TREE_TYPE (call_expr),
+                         init, call_expr);
     }
 
-  *tp = ret;
+  *tp = call_expr;
 }
 
 /* Emit all thunks to FN that should be emitted when FN is emitted.  */