[Bug c++/114562] [11/12/13 Regression] ICE when trying to bind rvalue reference to lvalue with comma operator and forwarding reference to pointer since r10-7410
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 1 20:31:49 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114562
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:7bc362ea61e5bf552356aa862beb7845fe50a47c
commit r13-8668-g7bc362ea61e5bf552356aa862beb7845fe50a47c
Author: Jason Merrill <jason@redhat.com>
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 qualified
by a ck_ref_bind around a ck_qual. We performed the ck_qual and then tried
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)
More information about the Gcc-bugs
mailing list