[Bug c++/105003] [12 regression] ICE in new test case from r12-7710-gc7a6a32739d62d

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 28 15:04:13 GMT 2022


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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:fc50d9a252c89c1bac78192bd0884ff23f2bf48b

commit r12-7857-gfc50d9a252c89c1bac78192bd0884ff23f2bf48b
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Mar 25 13:13:35 2022 -0400

    c++: hash table ICE with variadic alias [PR105003]

    For PR104008 we thought it might be enough to keep strip_typedefs from
    removing this alias template specialization, but this PR demonstrates that
    other parts of the compiler also need to know to consider it dependent.

    So, this patch changes complex_alias_template_p to no longer consider
    template parameters used when their only use appears in a pack expansion,
    unless they are the parameter packs being expanded.

    To do that I also needed to change it to use cp_walk_tree instead of
    for_each_template_parm.  It occurs to me that find_template_parameters
    should probably also use cp_walk_tree, but I'm not messing with that now.

            PR c++/105003
            PR c++/104008
            PR c++/102869

    gcc/cp/ChangeLog:

            * pt.cc (complex_alias_template_r): walk_tree callback, replacing
            uses_all_template_parms_r, complex_pack_expansion_r.
            (complex_alias_template_p): Adjust.
            * tree.cc (strip_typedefs): Revert r12-7710 change.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/variadic-alias6.C: New test.
            * g++.dg/cpp0x/variadic-alias7.C: New test.


More information about the Gcc-bugs mailing list