https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86986

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Apr  5 02:50:18 2019
New Revision: 270159

URL: https://gcc.gnu.org/viewcvs?rev=270159&root=gcc&view=rev
Log:
        PR c++/86986 - ICE with TTP with parameter pack.

Three separate issues were breaking this testcase.  One, we were trying to
look at the type of a template template parameter to see if it's a valid
non-type template parameter.  Two, we were treating a parameter pack named
in the type of a template parameter pack of a TTP pack as being one of the
packs expanded by the outer pack.  Three, we weren't supplying all the
necessary levels of template arguments when TTP matching.

        * pt.c (coerce_template_parameter_pack): Only look at the type of a
        non-type parameter pack.
        (fixed_parameter_pack_p_1): Don't recurse into the type of a
        non-type parameter pack.
        (coerce_template_template_parms): Call add_outermost_template_args.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/variadic-ttp9.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c

Reply via email to