From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C5A83385701B; Thu, 8 Jun 2023 14:28:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5A83385701B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686234484; bh=FNuWBiKYG77/Ao62uzZBf13v6P/YZWXs3HUv1sPI8zI=; h=From:To:Subject:Date:From; b=u8pWKpGKFmIeRPdbz3oGvLi4rZGun9ciWBJhhtR9jGYMwMA9+ILH3+e46uhSOLEB9 K2BGjYsd5jRGZcWfGvhHTNydgsVAHXSkMTiXlodxu3WoHBICrH01k4ksY6fv8d1vT2 ++/qhT7bIPeJAIldMsip2Uxl1KjVRoqPlFyAnCBc= From: "yronglin777 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110175] New: [GCC][Crash] GCC Crash on valid code Date: Thu, 08 Jun 2023 14:28:04 +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: yronglin777 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 bug_severity priority component assigned_to reporter 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=3D110175 Bug ID: 110175 Summary: [GCC][Crash] GCC Crash on valid code Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: yronglin777 at gmail dot com Target Milestone: --- https://godbolt.org/z/Wf7M89v8x ``` template auto f(T t) -> decltype(++t) { return t; } void f(...) {} void g() { f(true); } ``` ``` internal compiler error: error reporting routines re-entered. 0x23b8691 warning_at(unsigned int, int, char const*, ...) ???:0 0xd39208 cp_build_unary_op(tree_code, tree_node*, bool, int) ???:0 0xacd484 build_new_op(op_location_t const&, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node*, tree_node**, int) ???:0 0xd370e3 build_x_unary_op(unsigned int, tree_code, cp_expr, tree_node*, int) ???:0 0xcb685f tsubst(tree_node*, tree_node*, int, tree_node*) ???:0 0x23d8a2c pp_format(pretty_printer*, text_info*) ???:0 0x23d9c3d pp_format_verbatim(pretty_printer*, text_info*) ???:0 0x23d9d25 pp_verbatim(pretty_printer*, char const*, ...) ???:0 0x23b7895 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info= *) ???:0 0x23b8691 warning_at(unsigned int, int, char const*, ...) ???:0 0xd45bf1 check_return_expr(tree_node*, bool*) ???:0 0xcef6a3 finish_return_stmt(tree_node*) ???:0 0xcaf2f8 instantiate_decl(tree_node*, bool, bool) ???:0 0xcda84b instantiate_pending_templates(int) ???:0 0xb8e905 c_parse_final_cleanups() ???:0 0xdbe998 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 ``` If remove the function body of 2 `f` functions, GCC will works well. ``` template auto f(T t) -> decltype(++t); void f(...); void g() { f(true); } ```=