re PR c++/35678 (partial template specialization ICE in dependent_type_p, at cp/pt.c:15539)

PR c++/35678
        * pt.c (template_template_parm_bindings_ok_p): Set
        processing_template_decl while in this function.

From-SVN: r134515
This commit is contained in:
Jason Merrill 2008-04-21 11:59:36 -04:00 committed by Jason Merrill
parent 688e7a5344
commit ee34d21ad5
4 changed files with 29 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2008-04-21 Jason Merrill <jason@redhat.com>
PR c++/35678
* pt.c (template_template_parm_bindings_ok_p): Set
processing_template_decl while in this function.
2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
* cvt.c (type_promotes_to): Support char16_t and char32_t.

View File

@ -4814,6 +4814,10 @@ bool
template_template_parm_bindings_ok_p (tree tparms, tree targs)
{
int i, ntparms = TREE_VEC_LENGTH (tparms);
bool ret = true;
/* We're dealing with template parms in this process. */
++processing_template_decl;
targs = INNERMOST_TEMPLATE_ARGS (targs);
@ -4864,13 +4868,18 @@ template_template_parm_bindings_ok_p (tree tparms, tree targs)
tf_none,
tparm,
targs))
return false;
{
ret = false;
goto out;
}
}
}
}
/* Everything is okay. */
return true;
out:
--processing_template_decl;
return ret;
}
/* Convert the indicated template ARG as necessary to match the

View File

@ -1,3 +1,8 @@
2008-04-21 Jason Merrill <jason@redhat.com>
PR c++/35678
* g++.dg/template/ttp27.C: New.
2008-04-21 Tom Tromey <tromey@redhat.com>
PR libcpp/33415:

View File

@ -0,0 +1,6 @@
// PR c++/35678
template<typename T, T> struct A;
template<typename> struct B;
template<template<typename T, T> class U> struct B<U<char, 'h'> > {};
B<A<char,'h'> > x;