http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51180

--- Comment #4 from dodji at seketeli dot org <dodji at seketeli dot org> 
2011-12-02 10:15:06 UTC ---
"jason at gcc dot gnu.org" <gcc-bugzi...@gcc.gnu.org> a écrit:

> I'm surprised that it doesn't just work already; writing t2<B...> already
> works, doing the substitution ought to work the same way.

It wasn't working in this case because we are getting into the "if"
below in coerce_template_parms:

  if ((nargs > nparms && !variadic_p)
      || (nargs < nparms - variadic_p
      && require_all_args
      && (!use_default_args
          || (TREE_VEC_ELT (parms, nargs) != error_mark_node
                  && !TREE_PURPOSE (TREE_VEC_ELT (parms, nargs))))))
    {

We are getting there because the number of arguments of t2 in that
case is smaller than its number of parms.

I am still tweaking other parts of the patch to make it pass bootstrap
and testing.

Reply via email to