From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0A2CF3858D28; Sun, 16 Oct 2022 00:48:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A2CF3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665881336; bh=/l5V/EzhGymbZJiUJQhrFtxWSKqi6d9FFsqp9Jv62kU=; h=From:To:Subject:Date:From; b=HTKjNAfRB9peY5m+gNKRWQbqtQsF1M1lkmmZ6srGWt/iuwOcSIAHnZGC80VPTwA9p QgskCl8LwbRQXD4rnypDyXJ3AQJPYnre2VE6dvnt3I9UDS4yPIoY5Zy8IDZYTzZLyT AFM0BJSGlqJ3heYRyQku6Psezl4FRpml9bZbNiok= From: "johelegp at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107276] New: ICE Deducting return type from ill-formed structured binding name Date: Sun, 16 Oct 2022 00:48:55 +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: 13.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: johelegp at gmail dot 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 keywords bug_severity priority component assigned_to reporter cc target_milestone 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=3D107276 Bug ID: 107276 Summary: ICE Deducting return type from ill-formed structured binding name Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https://compiler-explorer.com/z/6MqKTjKd7. ```C++ auto f(auto x) { auto [y] =3D x; return y; } int i =3D f(0); ``` ``` : In instantiation of 'auto f(auto:1) [with auto:1 =3D int]': :5:10: required from here :2:8: error: cannot decompose non-array non-class type 'int' 2 | auto [y] =3D x; | ^~~ :3:10: internal compiler error: tree check: expected non_lvalue_exp= r or static_cast_expr, have error_mark in set_implicit_rvalue_p, at cp/cp-tree.h:8688 3 | return y; | ^ 0x236ef7e internal_error(char const*, ...) ???:0 0x95b166 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ???:0 0xc9d1ca do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context, tree_node*, int) ???:0 0xd4e054 check_return_expr(tree_node*, bool*) ???:0 0xcf39f3 finish_return_stmt(tree_node*) ???:0 0xcad9e6 instantiate_decl(tree_node*, bool, bool) ???:0 0xb8e015 maybe_instantiate_decl(tree_node*) ???:0 0xb8fa9e mark_used(tree_node*, int) ???:0 0xad275e build_new_function_call(tree_node*, vec**, int) ???:0 0xcf93c8 finish_call_expr(tree_node*, vec**, b= ool, bool, int) ???:0 0xc806a7 c_parse_file() ???:0 0xdbdef9 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. Compiler returned: 1 ```=