From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E24A9385841B; Sun, 19 Dec 2021 17:10:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E24A9385841B From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103714] [11/12 Regression] name lookup in requires-clause finds wrong thing Date: Sun, 19 Dec 2021 17:10:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2021 17:10:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103714 --- Comment #2 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:30c286aa9377850c64aa35f5845a59d321a44be0 commit r12-6063-g30c286aa9377850c64aa35f5845a59d321a44be0 Author: Patrick Palka 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.=