PR c++/46696
* typeck.c (cp_build_modify_expr): Check DECL_DEFAULTED_FN.
From-SVN: r174226
2011-05-25 Jason Merrill <jason@redhat.com>
+ PR c++/46696
+ * typeck.c (cp_build_modify_expr): Check DECL_DEFAULTED_FN.
+
PR c++/47184
* parser.c (cp_parser_parameter_declaration): Recognize
list-initialization.
/* Allow array assignment in compiler-generated code. */
else if (!current_function_decl
- || !DECL_ARTIFICIAL (current_function_decl))
+ || !DECL_DEFAULTED_FN (current_function_decl))
{
/* This routine is used for both initialization and assignment.
Make sure the diagnostic message differentiates the context. */
2011-05-25 Jason Merrill <jason@redhat.com>
+ * g++.dg/cpp0x/defaulted29.C: New.
+
* g++.dg/cpp0x/initlist51.C: New.
2011-05-25 Janis Johnson <janisjo@codesourcery.com>
--- /dev/null
+// PR c++/46696
+// { dg-options -std=c++0x }
+
+struct A
+{
+ A& operator= (A const&);
+};
+
+struct B
+{
+ A ar[1];
+ B& operator= (B const&) = default;
+};
+
+int main()
+{
+ B x;
+ B y;
+ y = x;
+}