+2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/7939
+ * typeck.c (comptypes): Don't ICE when its first argument is
+ error_mark_node.
+ (compparms): Reverse the arguments of same_type_p.
+
2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
PR c++/12184
if (t1 == t2)
return true;
- /* This should never happen. */
- my_friendly_assert (t1 != error_mark_node, 307);
-
/* Suppress errors caused by previously reported errors */
- if (t2 == error_mark_node)
+ if (t1 == error_mark_node || t2 == error_mark_node)
return false;
my_friendly_assert (TYPE_P (t1) && TYPE_P (t2), 20030623);
they fail to match. */
if (!t1 || !t2)
return false;
- if (!same_type_p (TREE_VALUE (t2), TREE_VALUE (t1)))
+ if (!same_type_p (TREE_VALUE (t1), TREE_VALUE (t2)))
return false;
}
return true;
+2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/7939
+ * g++.dg/template/crash11.C: New test.
+
2003-09-16 Jason Merrill <jason@redhat.com>
Jakub Jelinek <jakub@redhat.com>
--- /dev/null
+// { dg-do compile }
+
+// Origin: kparz@iastate.edu
+
+// PR c++/7939: ICE for invalid function parameter after template
+// substitution.
+
+template <class T, class U> void foo(T, U) {}
+template <class T> void foo<T,void>(T, void) {} // { dg-error "incomplete|invalid|partial" }