------- 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