From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A327C385800B; Fri, 26 Jan 2024 14:42:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A327C385800B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706280144; bh=4uZVyu2etEjOSBZm/FEjePBIfaOnGmzw0ZTUmP+tSC4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=T/AAMlAzJXyIPgSweCb09eY9HD9X7IVGdRf+UIzIdgFo/GhjUBLChmnKt8X0ikw2I ReHdWiqUBXurgnKYtGlhwmHDM8A3bRm+I3VlPjnhi3gTC6fUfJ8VxNnF6UzR827yME j968Jn3npcTpzSwpBJWBc8r4L7Yn7+UFifk6E/nQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113529] Incorrect result of requires-expression in case of function call ambiguity and `operator<=>` Date: Fri, 26 Jan 2024 14:42:23 +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: 13.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113529 --- Comment #3 from GCC Commits --- The releases/gcc-13 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:663d9e168bc1f2649721436f5188563eda9d04f0 commit r13-8255-g663d9e168bc1f2649721436f5188563eda9d04f0 Author: Patrick Palka Date: Wed Jan 24 17:11:09 2024 -0500 c++: ambiguous member lookup for rewritten cands [PR113529] Here we handle the operator expression u < v inconsistently: in a SFINAE context we accept it, and in a non-SFINAE context we reject it with error: request for member 'operator<=3D>' is ambiguous as per [class.member.lookup]/6. This inconsistency is ultimately because we neglect to propagate error_mark_node after recursing in add_operator_candidates, fixed like so. PR c++/113529 gcc/cp/ChangeLog: * call.cc (add_operator_candidates): Propagate error_mark_node result after recursing to find rewritten candidates. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/spaceship-sfinae3.C: New test. Reviewed-by: Jason Merrill (cherry picked from commit fecb45a936d62ca24dd8b4985ea0555c28edefa8)=