From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E15743858CDA; Sun, 22 Oct 2023 10:37:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E15743858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697971068; bh=vNcPpkJCzLTxvqRaXAzAHcoqhk9e0eELQYE/N3zk6s8=; h=From:To:Subject:Date:From; b=BdCOoB36cuTT80rNbqcZNOLeYyPBQJwlwj/vLPU4da7aZXuLctqi4WlUwFtti8zZT dPwRHj1DvMagG128q279bfea13qzfz5yW/RZcbTOm1tDpJ9i+0Ecp74J4VYbAg0yWF PtbT3W7F9COTAWHmgdXlhz2MDWMUXKmUFcOFgS2s= From: "141242068 at smail dot nju.edu.cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/111921] New: GCC: 14: internal compiler error: Segmentation fault Date: Sun, 22 Oct 2023 10:37:48 +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=3D111921 Bug ID: 111921 Summary: GCC: 14: internal compiler error: Segmentation fault 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 compile this program with GCC, gcc segfaults: ``` _Atomic(int) a; const double b; int main(void) { void f(void *arg) { return ; } return a |=3D b; } ``` The function definition `f` inside main is essential to trigger this segfau= lt, without this func, GCC simply reports an error. Compiler Explorer: https://gcc.godbolt.org/z/P58W6ssaG The stack dump: ``` : In function 'main': :5:12: error: invalid operands to binary | (have 'int' and 'double') 5 | return a |=3D b; | ~~~~~~ ^~ | | | int :3:5: internal compiler error: Segmentation fault 3 | int main(void) { | ^~~~ 0x231f49e internal_error(char const*, ...) ???:0 0x1462bbc walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*)) ???:0 0xda9275 walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ???:0 0xda96e9 walk_gimple_stmt(gimple_stmt_iterator*, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_nod= e**, int*, void*), walk_stmt_info*) ???:0 0xda9888 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ???:0 0xda9761 walk_gimple_stmt(gimple_stmt_iterator*, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_nod= e**, int*, void*), walk_stmt_info*) ???:0 0xda9888 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ???:0 0xda9761 walk_gimple_stmt(gimple_stmt_iterator*, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_nod= e**, int*, void*), walk_stmt_info*) ???:0 0xda9888 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ???:0 0x11cef6b lower_nested_functions(tree_node*) ???:0 0xbea49e cgraph_node::analyze() ???:0 0xbee231 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. ```=