This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33342] [4.3 Regression] ICE in dependent_type_p, at cp/pt.c:15081
- From: "jason at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Sep 2007 03:52:23 -0000
- Subject: [Bug c++/33342] [4.3 Regression] ICE in dependent_type_p, at cp/pt.c:15081
- References: <bug-33342-14408@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jason at redhat dot com 2007-09-08 03:52 -------
Subject: Re: [4.3 Regression] ICE in dependent_type_p, at
cp/pt.c:15081
This patch seems to fix the bug, but I haven't had a chance to
regression test it or reduce the testcase, and may not get a chance for
a bit.
Index: pt.c
===================================================================
*** pt.c (revision 128240)
--- pt.c (working copy)
*************** most_specialized_class (tree type, tree
*** 13646,13651 ****
--- 13646,13653 ----
{
int i;
+ ++processing_template_decl;
+
/* Discard the outer levels of args, and then substitute in the
template args from the enclosing class. */
partial_spec_args = INNERMOST_TEMPLATE_ARGS (partial_spec_args);
*************** most_specialized_class (tree type, tree
*** 13661,13666 ****
--- 13663,13670 ----
for (i = TREE_VEC_LENGTH (parms) - 1; i >= 0; --i)
TREE_VEC_ELT (parms, i) =
tsubst (TREE_VEC_ELT (parms, i), outer_args, tf_none, NULL_TREE);
+
+ --processing_template_decl;
}
spec_args = get_class_bindings (parms,
partial_spec_args,
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33342