+2013-02-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/56235
+ * method.c (do_build_copy_constructor): Don't bother turning
+ scalars from lvalues to xvalues.
+ (do_build_copy_assign): Likewise.
+
2013-02-06 Jason Merrill <jason@redhat.com>
* parser.c (cp_parser_enum_specifier): Check for error_mark_node.
}
init = build3 (COMPONENT_REF, expr_type, parm, field, NULL_TREE);
- if (move_p && TREE_CODE (expr_type) != REFERENCE_TYPE)
+ if (move_p && TREE_CODE (expr_type) != REFERENCE_TYPE
+ /* 'move' breaks bit-fields, and has no effect for scalars. */
+ && !scalarish_type_p (expr_type))
init = move (init);
init = build_tree_list (NULL_TREE, init);
expr_type = cp_build_qualified_type (expr_type, quals);
init = build3 (COMPONENT_REF, expr_type, init, field, NULL_TREE);
- if (move_p && TREE_CODE (expr_type) != REFERENCE_TYPE)
+ if (move_p && TREE_CODE (expr_type) != REFERENCE_TYPE
+ /* 'move' breaks bit-fields, and has no effect for scalars. */
+ && !scalarish_type_p (expr_type))
init = move (init);
if (DECL_NAME (field))