+2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/10555, c++/10576
+ * pt.c (lookup_template_class): Handle class template with
+ multiple levels of parameters when one of the levels contain
+ errors.
+
2003-05-08 Jason Merrill <jason@redhat.com>
* init.c (build_new_1): Don't reuse a TARGET_EXPR in an
tree a = coerce_template_parms (TREE_VALUE (t),
arglist, template,
complain, /*require_all_args=*/1);
+
+ /* Don't process further if one of the levels fails. */
+ if (a == error_mark_node)
+ {
+ /* Restore the ARGLIST to its full size. */
+ TREE_VEC_LENGTH (arglist) = saved_depth;
+ POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, error_mark_node);
+ }
+
SET_TMPL_ARGS_LEVEL (bound_args, i, a);
/* We temporarily reduce the length of the ARGLIST so
+2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/10555, c++/10576
+ * g++.dg/template/memclass1.C: New test.
+
2003-05-08 DJ Delorie <dj@redhat.com>
* gcc.c-torture/execute/20020404-1.x: New, skip for 16-bit
--- /dev/null
+// { dg-do compile }
+
+// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+// PR c++/10555: ICE for member class template when one of the
+// template argument levels contains errors.
+
+template <typename> struct A
+{
+ template <typename> struct B;
+};
+
+template <typename T> struct C
+{
+ typedef typename A<T>::template B<U> X; // { dg-error "declared|invalid" }
+};
+
+C<void> c; // { dg-error "instantiated" }