From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 45A013858C55; Tue, 2 Apr 2024 10:15:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 45A013858C55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712052918; bh=ACJyPUrWD7kKecnhDzM+Fmf9owtFaC3j2FO3LMp71bk=; h=From:To:Subject:Date:From; b=gzAz+1+U9sxOZsfhPDbZ1sgqj4YUvP0kvW7iTA+E1Ox4u9q8OOg50WN1+puPxBMQt p/kJ3cKza4g8Wx546i/6MH+5SWi5mRMfldptzBCgVTqbTN1arigS8L3XDzFJLjrgzw Sn2jKauahAed2PMvBMlro/zCFMeYJbwIvcnED3tw= From: "Liam.Jackson@qa-systems.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114562] New: ICE when trying to bind rvalue reference to lvalue with comma operator and forwarding reference to pointer Date: Tue, 02 Apr 2024 10:15:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Liam.Jackson@qa-systems.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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 Bug ID: 114562 Summary: ICE when trying to bind rvalue reference to lvalue with comma operator and forwarding reference to pointer Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: Liam.Jackson@qa-systems.com Target Milestone: --- Created attachment 57846 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57846&action=3Dedit Source to reproduce ice Compiling the attached source would expect to raise an error such as=20 error: cannot bind rvalue reference of type 'const void*&&' to lvalue of ty= pe 'void* const' Instead the following ICE occurs: : In instantiation of 'static T Create::create(U&&) [with U =3D = void* const&; T =3D MyClass]': :34:28: required from here 34 | Create::create(MyClass::NONE); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ :28:13: internal compiler error: in convert_like_internal, at cp/call.cc:8879 28 | return T( ( (beforeParam()), (u) ) ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x266d8bc internal_error(char const*, ...) ???:0 0xa572eb fancy_abort(char const*, int, char const*) ???:0 0xa81334 build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int) ???:0 0xa8265b build_special_member_call(tree_node*, tree_node*, vec**, tree_node*, int, int) ???:0 0xa8ff69 perform_direct_initialization_if_possible(tree_node*, tree_node*, bool, int) ???:0 0xd33f73 build_functional_cast(unsigned int, tree_node*, tree_node*, int) ???:0 0xc92ed3 instantiate_decl(tree_node*, bool, bool) ???:0 0xcbc0ab instantiate_pending_templates(int) ???:0 0xb5a619 c_parse_final_cleanups() ???:0 0xdaf328 c_common_parse_file() ???:0 It may be possible to construct an example source which is expected to comp= ile successfully yet still triggers this ICE. This has not been explored.=