From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8FAA83843844; Tue, 25 Jun 2024 12:54:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8FAA83843844 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1719320082; bh=2KtIJmUHLSJ07JyLx1qh71etaJ1WRn1Ojw3wUDKwJb0=; h=From:To:Subject:Date:From; b=JZK0Ui33T2abpds4IShHs6fgSK5qCTVjNHFDq1vS50HVff0lr8Npnq9COjjLofVzF 3xua+u/Fm4sk9Dlh2ODs2NJEYYTt36W7sWJYmPmss7WO5Oqqk5pGCEZ52rBObYxskc urPjbNgSW6Q9teNn81RF3batFSCy5QBRU+nc1fZE= From: "141242068 at smail dot nju.edu.cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/115644] New: [gcc][trunk] ICE if redeclare a variable with different type Date: Tue, 25 Jun 2024 12:54:41 +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: 15.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=3D115644 Bug ID: 115644 Summary: [gcc][trunk] ICE if redeclare a variable with different type Product: gcc Version: 15.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: --- Quick verification link: https://gcc.godbolt.org/z/fdY8KqhK6 The testing program: ``` void foo () { int p[5]; int v =3D *p; int *p =3D 0; } ``` Compiling this program using gcc-trunk will trigger crash, and dump stacks = as follows: ``` 0x23be10c internal_error(char const*, ...) ???:0 0x8948df tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ???:0 0xd120d0 gimple_fold_indirect_ref(tree_node*) ???:0 0xd5b8f7 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ???:0 0xd5f06a gimplify_stmt(tree_node**, gimple**) ???:0 0xd5c472 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ???:0 0xd5f06a gimplify_stmt(tree_node**, gimple**) ???:0 0xd5c75b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ???:0 0xd5f06a gimplify_stmt(tree_node**, gimple**) ???:0 0xd5bf2a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ???:0 0xd651b3 gimplify_body(tree_node*, bool) ???:0 0xd655f9 gimplify_function_tree(tree_node*) ???:0 0xb87377 cgraph_node::analyze() ???:0 0xb8a6d1 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. ```=