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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:542d90bfd802274f38637aaaffc2dd1de62c9ec6

commit r11-8714-g542d90bfd802274f38637aaaffc2dd1de62c9ec6
Author: Jason Merrill <ja...@redhat.com>
Date:   Wed May 26 17:38:42 2021 -0400

    c++: argument pack with expansion [PR86355]

    This testcase revealed that we were using PACK_EXPANSION_EXTRA_ARGS a lot
    more than necessary; use_pack_expansion_extra_args_p meant to use it in the
    case of corresponding arguments in different argument packs differing in
    whether they are pack expansions, but it was mistakenly also returning true
    for the case of a single argument pack containing both expansion and
    non-expansion elements.

    Surprisingly, just disabling that didn't lead to any regressions in the
    testsuite; it seems other changes have prevented us getting to this point
    for code that used to exercise it.  So this patch limits the check to
    arguments in the same position in the packs, and asserts that we never
    actually see a mismatch.

            PR c++/86355

    gcc/cp/ChangeLog:

            * pt.c (use_pack_expansion_extra_args_p): Don't compare
            args from the same argument pack.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/alias-decl-variadic2.C: New test.

Reply via email to