From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6033938432F5; Fri, 24 May 2024 13:26:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6033938432F5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716557207; bh=Gyre5A9WWnQUnjtbdxRMhd2VPRTOeTpXKjgZBwdFONc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QnrAcpe0/bJoRVGI/+B06KI03O84xLLAAZiGN0jsCza36t2QL4Fwsh4OeQgjwjmp+ L79SoPCxPfFTPJ2srUDyDs9leplhmAsYJCVN4r9fKGss7BPaXqdySLS8k8/Ex/Cos0 TiYOnZpHQ2Rq4dnJg1y6n+jIB86bLpCG+GtvWr/A= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114562] [11/12 Regression] ICE when trying to bind rvalue reference to lvalue with comma operator and forwarding reference to pointer since r10-7410 Date: Fri, 24 May 2024 13:26:45 +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: 14.0 X-Bugzilla-Keywords: ice-on-invalid-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: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 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=3D114562 --- Comment #4 from GCC Commits --- The releases/gcc-12 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:7076c565e22281e193aeafafbf40676426a64b75 commit r12-10466-g7076c565e22281e193aeafafbf40676426a64b75 Author: Jason Merrill Date: Tue Apr 2 10:52:28 2024 -0400 c++: binding reference to comma expr [PR114561] We represent a reference binding where the referent type is more qualif= ied by a ck_ref_bind around a ck_qual. We performed the ck_qual and then t= ried to undo it with STRIP_NOPS, but that doesn't work if the conversion is buried in COMPOUND_EXPR. So instead let's avoid performing that fake conversion in the first place. PR c++/114561 PR c++/114562 gcc/cp/ChangeLog: * call.cc (convert_like_internal): Avoid adding qualification conversion in direct reference binding. gcc/testsuite/ChangeLog: * g++.dg/conversion/ref10.C: New test. * g++.dg/conversion/ref11.C: New test. (cherry picked from commit 5d7e9a35024f065b25f61747859c7cb7a770c92b)=