From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 475753858C2D; Wed, 19 Oct 2022 18:35:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 475753858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666204538; bh=iiTXklK0sRYnhSExAUBrFzb5YrHSEGrjUiHC9k+4UyQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PyeA5WJv+lPFyIgST3FN/WWgVsCD7SB6otHN1eue0wfKndQ6gmgs+TgTb3tcAExhM /Mb51fcNOxLub7LiLJ5iGwxMRN1ZoJlg+TqJ+KDo6F9ESqdvUTzjFgTWQh+05O21Iv FSZobVje2HDedOZAeggsAitHShLpL/XI2hxq9b8s= From: "johelegp at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107276] ICE Deducing return type from ill-formed structured binding name Date: Wed, 19 Oct 2022 18:35:37 +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.0 X-Bugzilla-Keywords: error-recovery, ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: johelegp at gmail dot com X-Bugzilla-Status: WAITING 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: 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=3D107276 --- Comment #2 from Johel Ernesto Guerrero Pe=C3=B1a --- I just compiled GCC and it still ICEs: ```cli $ ../root/gcc/bin/g++ --version g++ (GCC) 13.0.0 20221019 (experimental) Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ cat x.cpp=20 auto f(auto x) { auto [y] =3D x; return y; } int i =3D f(0); $ ../root/gcc/bin/g++ -std=3Dc++23 -c x.cpp=20 x.cpp: In instantiation of =E2=80=98auto f(auto:1) [with auto:1 =3D int]=E2= =80=99: x.cpp:5:10: required from here x.cpp:2:8: error: cannot decompose non-array non-class type =E2=80=98int=E2= =80=99 2 | auto [y] =3D x; | ^~~ x.cpp:3:10: internal compiler error: tree check: expected non_lvalue_expr or static_cast_expr, have error_mark in set_implicit_rvalue_p, at cp/cp-tree.h:8689 3 | return y; | ^ 0x22ea70c internal_error(char const*, ...) ???:0 0x8e3b63 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ???:0 0xbb8768 do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context, tree_node*, int) ???:0 0xc6d039 check_return_expr(tree_node*, bool*) ???:0 0xc101f3 finish_return_stmt(tree_node*) ???:0 0xbee0a3 instantiate_decl(tree_node*, bool, bool) ???:0 0xa9b5f5 maybe_instantiate_decl(tree_node*) ???:0 0xa9cfa0 mark_used(tree_node*, int) ???:0 0x9dcd4b build_new_function_call(tree_node*, vec**, int) ???:0 0xc16768 finish_call_expr(tree_node*, vec**, b= ool, bool, int) ???:0 0xb9949b c_parse_file() ???:0 0xcde1f1 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. ```=