From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B245C3939C1A; Wed, 29 Apr 2020 02:09:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B245C3939C1A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588126140; bh=NuRZH7mu6cJnMdjXGQCgSiLbVLsU5oAp/TGl/ME1RYE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cx8ecv0iDCY4GaYE1MfqI7cJet+X12UMTdMsuaNrxYjfUwC9Qfnc9XoZf6wpJ9f1Q yQY008cEb2KdIyEvVqtAcAKd1o86RDYXVephATog1/ZZaDBKKW9/Wp/+yCDZ/wrTtp gAhT2euUtSsdUI1qd//SkHvdaBMvY2s7oYU+3Stg= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94819] [10 Regression] Inherited and constrained constructors are "ambiguous" even if they aren't Pt. 2 Date: Wed, 29 Apr 2020 02:09:00 +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: 10.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.0 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: Wed, 29 Apr 2020 02:09:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94819 --- Comment #4 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:1d2290caad0dba52b285b47057b7c0e4e8d21feb commit r10-8025-g1d2290caad0dba52b285b47057b7c0e4e8d21feb Author: Patrick Palka Date: Tue Apr 28 21:45:59 2020 -0400 c++: Satisfaction caching of inherited ctor [PR94819] As observed in PR94719, an inherited constructor for an instantiation of a constructor template confusingly has as its DECL_INHERITED_CTOR the TEMPLATE_DECL of the constructor template rather than the particular instantiation of the template. This means two inherited constructors for two different instantiations of the same constructor template have the same DECL_INHERITED_CTOR. And since in satisfy_declaration_constraints our decl satisfaction cache is keyed off of the result of strip_inheriting_ctors, we may end up conflating the satisfaction values of the two inherited constructors' constraints. This patch fixes this issue by using the original tree, not the result of strip_inheriting_ctors, as the key to the decl satisfaction cache. gcc/cp/ChangeLog: PR c++/94819 * constraint.cc (satisfy_declaration_constraints): Use saved_t instead of t as the key to decl_satisfied_cache. gcc/testsuite/ChangeLog: PR c++/94819 * g++.dg/cpp2a/concepts-inherit-ctor10.C: New test. * g++.dg/cpp2a/concepts-inherit-ctor11.C: New test.=