Commit ee34d21a by Jason Merrill Committed by Jason Merrill

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
parent 688e7a53
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> 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
* cvt.c (type_promotes_to): Support char16_t and char32_t. * cvt.c (type_promotes_to): Support char16_t and char32_t.
......
...@@ -4814,6 +4814,10 @@ bool ...@@ -4814,6 +4814,10 @@ bool
template_template_parm_bindings_ok_p (tree tparms, tree targs) template_template_parm_bindings_ok_p (tree tparms, tree targs)
{ {
int i, ntparms = TREE_VEC_LENGTH (tparms); 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); targs = INNERMOST_TEMPLATE_ARGS (targs);
...@@ -4864,13 +4868,18 @@ template_template_parm_bindings_ok_p (tree tparms, tree targs) ...@@ -4864,13 +4868,18 @@ template_template_parm_bindings_ok_p (tree tparms, tree targs)
tf_none, tf_none,
tparm, tparm,
targs)) targs))
return false; {
ret = false;
goto out;
}
} }
} }
} }
/* Everything is okay. */ out:
return true;
--processing_template_decl;
return ret;
} }
/* Convert the indicated template ARG as necessary to match the /* Convert the indicated template ARG as necessary to match the
......
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> 2008-04-21 Tom Tromey <tromey@redhat.com>
PR libcpp/33415: PR libcpp/33415:
// 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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment