Commit 48e5d119 by Paolo Carlini Committed by Paolo Carlini

re PR c++/48606 (g++.dg/init/ctor9.C ICE: tree check: expected class 'type',…

re PR c++/48606 (g++.dg/init/ctor9.C ICE: tree check: expected class 'type', have 'exceptional' (error_mark) with -fkeep-inline-functions)

/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
parent b15c64ee
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>
......
......@@ -513,8 +513,10 @@ perform_member_init (tree member, tree init)
}
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
......
// PR c++/48606
// { dg-do compile }
// { dg-options "-fkeep-inline-functions" }
struct S
{
int &ref;
S() : ref() {}; // { dg-error "value-initialization of" }
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment