Commit 68fef9f9 by Paolo Carlini Committed by Paolo Carlini

re PR c++/43028 ([C++0x] internal compiler error in maybe_adjust_types_for_deduction)

/cp
2010-05-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/43028
	* pt.c (unify): Check each elt for error_mark_node.

/testsuite
2010-05-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/43028
	* g++.dg/cpp0x/initlist31.C: New.

From-SVN: r159045
parent 97e3c923
2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/43028
* pt.c (unify): Check each elt for error_mark_node.
2010-05-04 Jason Merrill <jason@redhat.com> 2010-05-04 Jason Merrill <jason@redhat.com>
PR c++/38064 PR c++/38064
......
...@@ -14468,6 +14468,10 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict) ...@@ -14468,6 +14468,10 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict)
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (arg), i, elt) FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (arg), i, elt)
{ {
int elt_strict = strict; int elt_strict = strict;
if (elt == error_mark_node)
return 1;
if (!BRACE_ENCLOSED_INITIALIZER_P (elt)) if (!BRACE_ENCLOSED_INITIALIZER_P (elt))
{ {
tree type = TREE_TYPE (elt); tree type = TREE_TYPE (elt);
......
2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/43028
* g++.dg/cpp0x/initlist31.C: New.
2010-05-04 Jakub Jelinek <jakub@redhat.com> 2010-05-04 Jakub Jelinek <jakub@redhat.com>
PR c/43981 PR c/43981
......
// PR c++/43028
// { dg-options "-std=c++0x" }
#include <initializer_list>
struct string { string(std::initializer_list<char>) { } };
void f() {
auto y =
{
string(Equation()) // { dg-error "not declared" }
}; // { dg-error "unable to deduce" }
}
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