Commit 71d1add3 by Jason Merrill Committed by Jason Merrill

semantics.c (simplify_aggr_init_expr): Remove remnants of 2014-04-11 change.

	* semantics.c (simplify_aggr_init_expr): Remove remnants of
	2014-04-11 change.

From-SVN: r212153
parent 4f82fed2
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> 2014-06-30 Marek Polacek <polacek@redhat.com>
* cp-gimplify.c (cp_genericize): Don't instrument returns if the * cp-gimplify.c (cp_genericize): Don't instrument returns if the
......
...@@ -3870,7 +3870,6 @@ simplify_aggr_init_expr (tree *tp) ...@@ -3870,7 +3870,6 @@ simplify_aggr_init_expr (tree *tp)
AGGR_INIT_EXPR_ARGP (aggr_init_expr)); AGGR_INIT_EXPR_ARGP (aggr_init_expr));
TREE_NOTHROW (call_expr) = TREE_NOTHROW (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); CALL_EXPR_LIST_INIT_P (call_expr) = CALL_EXPR_LIST_INIT_P (aggr_init_expr);
tree ret = call_expr;
if (style == ctor) if (style == ctor)
{ {
...@@ -3886,7 +3885,7 @@ simplify_aggr_init_expr (tree *tp) ...@@ -3886,7 +3885,7 @@ simplify_aggr_init_expr (tree *tp)
expand_call{,_inline}. */ expand_call{,_inline}. */
cxx_mark_addressable (slot); cxx_mark_addressable (slot);
CALL_EXPR_RETURN_SLOT_OPT (call_expr) = true; 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) else if (style == pcc)
{ {
...@@ -3894,11 +3893,11 @@ simplify_aggr_init_expr (tree *tp) ...@@ -3894,11 +3893,11 @@ simplify_aggr_init_expr (tree *tp)
need to copy the returned value out of the static buffer into the need to copy the returned value out of the static buffer into the
SLOT. */ SLOT. */
push_deferring_access_checks (dk_no_check); push_deferring_access_checks (dk_no_check);
ret = build_aggr_init (slot, ret, call_expr = build_aggr_init (slot, call_expr,
DIRECT_BIND | LOOKUP_ONLYCONVERTING, DIRECT_BIND | LOOKUP_ONLYCONVERTING,
tf_warning_or_error); tf_warning_or_error);
pop_deferring_access_checks (); 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)) if (AGGR_INIT_ZERO_FIRST (aggr_init_expr))
...@@ -3906,10 +3905,11 @@ simplify_aggr_init_expr (tree *tp) ...@@ -3906,10 +3905,11 @@ simplify_aggr_init_expr (tree *tp)
tree init = build_zero_init (type, NULL_TREE, tree init = build_zero_init (type, NULL_TREE,
/*static_storage_p=*/false); /*static_storage_p=*/false);
init = build2 (INIT_EXPR, void_type_node, slot, init); 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. */ /* Emit all thunks to FN that should be emitted when FN is emitted. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment