https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111836
Bug ID: 111836 Summary: gcc: internal compiler error: in get_expr_operands, at tree-ssa-operands.cc Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: congli at smail dot nju.edu.cn Target Milestone: --- Compiler explorer: https://godbolt.org/z/v3q61PETv. The following program `small.c` triggers a crash in gcc-14: ``` sh % cat small.c void __GIMPLE (ssa) t () { i = __PHI (__BB6: _Literal (i32) 1, __BB4: j); } % gcc-tk -O0 small.c <source>:1:6: error: '__GIMPLE' only valid with '-fgimple' 1 | void __GIMPLE (ssa) t () { | ^~~~~~~~ <source>: In function 't': <source>:2:3: error: 'i' undeclared (first use in this function) 2 | i = __PHI (__BB6: _Literal (i32) 1, __BB4: j); | ^ <source>:2:3: note: each undeclared identifier is reported only once for each function it appears in <source>:2:31: error: unknown type name 'i32' 2 | i = __PHI (__BB6: _Literal (i32) 1, __BB4: j); | ^~~ <source>:2:46: error: 'j' undeclared (first use in this function) 2 | i = __PHI (__BB6: _Literal (i32) 1, __BB4: j); | ^ unhandled expression in get_expr_operands(): <error_mark 0x7fa8abdfaf18> <source>:3:1: internal compiler error: in get_expr_operands, at tree-ssa-operands.cc:940 3 | } | ^ 0x230184e internal_error(char const*, ...) ???:0 0x9fb842 fancy_abort(char const*, int, char const*) ???:0 0x12e301d operands_scanner::get_expr_operands(tree_node**, int) ???:0 0x12e35c2 operands_scanner::parse_ssa_operands() ???:0 0x12e43ea operands_scanner::build_ssa_operands() ???:0 0x12e4634 update_stmt_operands(function*, gimple*) ???:0 0xd62007 update_modified_stmts(gimple*) ???:0 0xd620e9 gsi_insert_seq_after(gimple_stmt_iterator*, gimple*, gsi_iterator_update) ???:0 0xaad40e c_parser_parse_gimple_body(c_parser*, char*, c_declspec_il, profile_count) ???:0 0xaa3dfd c_parse_file() ???:0 0xb17139 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 <https://gcc.gnu.org/bugs/> for instructions. ``` GCC version: ``` gcc (Compiler-Explorer-Build-gcc-d5cfabc677b08f38ea5d5f85deeda746b4fabb88-binutils-2.40) 14.0.0 20231016 (experimental) Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ```