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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Patrick Palka
<ppa...@gcc.gnu.org>:

https://gcc.gnu.org/g:75d95f5f0151247c39f0beb01376485806d0fd47

commit r11-9401-g75d95f5f0151247c39f0beb01376485806d0fd47
Author: Patrick Palka <ppa...@redhat.com>
Date:   Sun Dec 19 12:10:16 2021 -0500

    c++: local_specializations and recursive constrained fn [PR103714]

    Here during constraint checking for the inner call to A<0>::f<0>,
    substitution into the PARM_DECL d in the atomic constraint yields the
    wrong local specialization because local_specializations at this point
    is nonempty, and contains specializations for the caller A<0>::f<1>.

    This patch makes us call push_to_top_level during satisfaction, which'll
    temporarily clear local_specializations for us.

            PR c++/103714

    gcc/cp/ChangeLog:

            * constraint.cc (satisfy_declaration_constraints): Do
            push_to_top_level and pop_from_top_level around the call to
            satisfy_normalized_constraints.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/concepts-uneval5.C: New test.

    (cherry picked from commit 30c286aa9377850c64aa35f5845a59d321a44be0)

Reply via email to