------- Comment #3 from dgregor at gcc dot gnu dot org 2007-10-31 12:23 ------- This tiny patch should fix the problem. We weren't digging into TYPENAME_TYPEs deep enough to find all of the parameter packs. The patch fixes both the original test case and the reduced one. However, I can't test it in isolation at the moment.
Index: pt.c =================================================================== --- pt.c (revision 129773) +++ pt.c (working copy) @@ -2505,6 +2505,12 @@ find_parameter_packs_r (tree *tp, int *w *walk_subtrees = 0; return NULL_TREE; + case TYPENAME_TYPE: + cp_walk_tree (&TYPENAME_TYPE_FULLNAME (t), &find_parameter_packs_r, + ppd, ppd->visited); + *walk_subtrees = 0; + return NULL_TREE; + case TYPE_PACK_EXPANSION: case EXPR_PACK_EXPANSION: *walk_subtrees = 0; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33955