PR c++/47503
* semantics.c (cxx_eval_call_expression): Shortcut trivial copy.
From-SVN: r170330
+2011-02-19 Jason Merrill <jason@redhat.com>
+
+ PR c++/47503
+ * semantics.c (cxx_eval_call_expression): Shortcut trivial copy.
+
2011-02-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/47795
return t;
}
+ /* Shortcut trivial copy constructor/op=. */
+ if (call_expr_nargs (t) == 2 && trivial_fn_p (fun))
+ return convert_from_reference (get_nth_callarg (t, 1));
+
/* If in direct recursive call, optimize definition search. */
if (old_call != NULL && old_call->fundef->decl == fun)
new_call.fundef = old_call->fundef;
+2011-02-19 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/regress/no-elide1.C: New.
+
2011-02-19 Alexandre Oliva <aoliva@redhat.com>
PR tree-optimization/46620
--- /dev/null
+// PR c++/47503
+// { dg-options "-std=c++0x -fno-elide-constructors" }
+
+struct A
+{
+ int i;
+ A ();
+};
+
+struct B
+{
+ A a;
+ B (A &aa) : a (aa) { }
+};