PR c++/10555, c++/10576
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. * g++.dg/template/memclass1.C: New test. From-SVN: r66634
This commit is contained in:
parent
f4e12a7cdb
commit
88e98cfeb7
|
@ -1,3 +1,10 @@
|
||||||
|
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>
|
2003-05-08 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
* init.c (build_new_1): Don't reuse a TARGET_EXPR in an
|
* init.c (build_new_1): Don't reuse a TARGET_EXPR in an
|
||||||
|
|
|
@ -4251,6 +4251,15 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope, complain)
|
||||||
tree a = coerce_template_parms (TREE_VALUE (t),
|
tree a = coerce_template_parms (TREE_VALUE (t),
|
||||||
arglist, template,
|
arglist, template,
|
||||||
complain, /*require_all_args=*/1);
|
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);
|
SET_TMPL_ARGS_LEVEL (bound_args, i, a);
|
||||||
|
|
||||||
/* We temporarily reduce the length of the ARGLIST so
|
/* We temporarily reduce the length of the ARGLIST so
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2003-05-08 DJ Delorie <dj@redhat.com>
|
||||||
|
|
||||||
* gcc.c-torture/execute/20020404-1.x: New, skip for 16-bit
|
* gcc.c-torture/execute/20020404-1.x: New, skip for 16-bit
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
// { 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" }
|
Loading…
Reference in New Issue