Commit a5c42740 by Jason Merrill Committed by Jason Merrill

re PR c++/23372 (Temporary aggregate copy not elided when passing parameters by value)

        PR c++/23372
        * call.c (build_over_call): Don't make a copy here if build_call
        will make one too.

From-SVN: r116342
parent c846e8cd
2006-08-22 Jason Merrill <jason@redhat.com>
PR c++/23372
* call.c (build_over_call): Don't make a copy here if build_call
will make one too.
2006-08-22 Andrew Pinski <pinskia@physics.uc.edu>
PR C++/28450
......
......@@ -4847,6 +4847,12 @@ build_over_call (struct z_candidate *cand, int flags)
tree type = TREE_VALUE (parm);
conv = convs[i];
/* Don't make a copy here if build_call is going to. */
if (conv->kind == ck_rvalue
&& !TREE_ADDRESSABLE (complete_type (type)))
conv = conv->u.next;
val = convert_like_with_context
(conv, TREE_VALUE (arg), fn, i - is_method);
......
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