From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4B7E9385840C; Sun, 16 Jul 2023 10:57:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4B7E9385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689505048; bh=Rpu/I25peaR8UK2ltCcr7yGIUyoqP9cRcHTerpvTMjE=; h=From:To:Subject:Date:From; b=ax5B/PYhR7Uz+XeCuJ04ZiYYYH4rxGLsgeYIoxR5p5phHIQ2SrCp5tsHdtU0sSgb4 2gc9Ul1TXZk2boKjeUMEQSzefgTgOmHrAoxh9awerUElRSkjt/ZzJxFa1Yjm2NNe1u qCKiIKrzfDuFY1tk7Oh6RCKui1LyCLuICaMswgcA= From: "141242068 at smail dot nju.edu.cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/110682] New: GCC, ICE: internal compiler error: in gimplify_expr, at gimplify.cc:16771 Date: Sun, 16 Jul 2023 10:57:27 +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: 141242068 at smail dot nju.edu.cn 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=3D110682 Bug ID: 110682 Summary: GCC, ICE: internal compiler error: in gimplify_expr, at gimplify.cc:16771 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compiling below program using gcc-14 with option `gcc-14 -Ofast a.c`, gcc-14 crashes: ``` struct a { const signed char b; }; void f(volatile struct a *c) { c - 0 % c->b; struct a c =3D {1}; } ``` GCC's output is pasted below: ``` : In function 'f': :7:12: error: 'c' redeclared as different kind of symbol 7 | struct a c =3D {1}; | ^ :5:27: note: previous definition of 'c' with type 'volatile struct = a *' 5 | void f(volatile struct a *c) { | ~~~~~~~~~~~~~~~~~~~^ :6:5: internal compiler error: in gimplify_expr, at gimplify.cc:167= 71 6 | c - 0 % c->b; | ~~^~~~~~~~~~ 0x2150dee internal_error(char const*, ...) ???:0 0x9ce06c fancy_abort(char const*, int, char const*) ???:0 0xd7057a gimplify_stmt(tree_node**, gimple**) ???:0 0xd6d9ba gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ???:0 0xd7057a gimplify_stmt(tree_node**, gimple**) ???:0 0xd6e4eb gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ???:0 0xd7057a gimplify_stmt(tree_node**, gimple**) ???:0 0xd6d954 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ???:0 0xd7057a gimplify_stmt(tree_node**, gimple**) ???:0 0xd71a13 gimplify_body(tree_node*, bool) ???:0 0xd71e6f gimplify_function_tree(tree_node*) ???:0 0xbaebe7 cgraph_node::analyze() ???:0 0xbb2731 symbol_table::finalize_compilation_unit() ???: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. ``` This can be verified by visiting the Compiler Explorer: https://gcc.godbolt.org/z/5951jvono=