+2010-05-17 Jason Merrill <jason@redhat.com>
+
+ PR c++/44158
+ * call.c (build_over_call): Don't do bitwise copy for move ctor.
+
2010-05-17 Dodji Seketeli <dodji@redhat.com>
Jason Merrill <jason@redhat.com>
}
/* [class.copy]: the copy constructor is implicitly defined even if
the implementation elided its use. */
- else if (TYPE_HAS_COMPLEX_INIT_REF (DECL_CONTEXT (fn)))
+ else if (TYPE_HAS_COMPLEX_INIT_REF (DECL_CONTEXT (fn))
+ || move_fn_p (fn))
{
mark_used (fn);
already_used = true;
{
if (TREE_CODE (arg) == TARGET_EXPR)
return arg;
- else if (TYPE_HAS_TRIVIAL_INIT_REF (DECL_CONTEXT (fn)))
+ else if (TYPE_HAS_TRIVIAL_INIT_REF (DECL_CONTEXT (fn))
+ && !move_fn_p (fn))
return build_target_expr_with_type (arg, DECL_CONTEXT (fn));
}
else if (TREE_CODE (arg) == TARGET_EXPR
+2010-05-17 Jason Merrill <jason@redhat.com>
+
+ PR c++/44158
+ * g++.dg/cpp0x/rv-trivial-bug.C: Test copy-init too.
+
2010-05-17 Martin Jambor <mjambor@suse.cz>
* g++.dg/ipa/ivinline-1.C: New test.
base2 b2(b);
assert(move_construct == 0);
base2 b3(static_cast<base2&&>(b));
- assert(move_construct == 1);
+ base2 b4 = static_cast<base2&&>(b);
+ assert(move_construct == 2);
b = b2;
assert(move_assign == 0);
b = static_cast<base2&&>(b2);