aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist31.C13
4 files changed, 27 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3f3b68e..e186a5d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+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>
PR c++/38064
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index fbf9b90..7561d3f 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -14468,6 +14468,10 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict)
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (arg), i, elt)
{
int elt_strict = strict;
+
+ if (elt == error_mark_node)
+ return 1;
+
if (!BRACE_ENCLOSED_INITIALIZER_P (elt))
{
tree type = TREE_TYPE (elt);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4b2fe7d..8e2ffc9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+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>
PR c/43981
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist31.C b/gcc/testsuite/g++.dg/cpp0x/initlist31.C
new file mode 100644
index 0000000..ffc9855
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist31.C
@@ -0,0 +1,13 @@
+// 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" }
+}