/cp
2011-04-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48606
* init.c (perform_member_init): Check build_value_init return
value for error_mark_node.
/testsuite
2011-04-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48606
* g++.dg/init/ctor10.C: New.
From-SVN: r173194
+2011-04-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/48606
+ * init.c (perform_member_init): Check build_value_init return
+ value for error_mark_node.
+
2011-04-29 Nicola Pero <nicola.pero@meta-innovation.com>,
Mike Stump <mikestump@comcast.net>
}
else
{
- init = build2 (INIT_EXPR, type, decl,
- build_value_init (type, tf_warning_or_error));
+ tree value = build_value_init (type, tf_warning_or_error);
+ if (value == error_mark_node)
+ return;
+ init = build2 (INIT_EXPR, type, decl, value);
finish_expr_stmt (init);
}
}
+2011-04-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/48606
+ * g++.dg/init/ctor10.C: New.
+
2011-04-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/48462
--- /dev/null
+// PR c++/48606
+// { dg-do compile }
+// { dg-options "-fkeep-inline-functions" }
+
+struct S
+{
+ int &ref;
+ S() : ref() {}; // { dg-error "value-initialization of" }
+};