aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2008-04-21 11:59:36 -0400
committerJason Merrill <jason@gcc.gnu.org>2008-04-21 11:59:36 -0400
commitee34d21ad53623a25ce5700dadfbed5a6a025c0e (patch)
tree67c41ac1b1ac984327bd1138812bd68dde186889 /gcc/cp
parent688e7a53446776e4d7b49472b06fec29ea69ff17 (diff)
downloadgcc-ee34d21ad53623a25ce5700dadfbed5a6a025c0e.zip
gcc-ee34d21ad53623a25ce5700dadfbed5a6a025c0e.tar.gz
gcc-ee34d21ad53623a25ce5700dadfbed5a6a025c0e.tar.bz2
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
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/pt.c15
2 files changed, 18 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index b348c0d..09b2e08 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 40662d9..e55ce97 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -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