https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100803
Bug ID: 100803 Summary: ICE on gimple code: in gimple_cond_get_ops_from_tree, at gimple-expr.c:566 Product: gcc Version: tree-ssa Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: cnsun at uwaterloo dot ca Target Milestone: --- $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/configure --enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch --prefix=/scratch/software/gcc-trunk --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20210527 (experimental) [master revision :d03f010a0:01c59ef2e5a59b44d2b662361196abb6be872a20] (GCC) $ cat mutant.c int bar(); __GIMPLE int foo() { if (bar()) goto bb1; else goto bb2; } $ gcc-trunk -fgimple mutant.c mutant.c: In function ‘foo’: mutant.c:7:5: internal compiler error: in gimple_cond_get_ops_from_tree, at gimple-expr.c:566 7 | goto bb2; | ^~~~ 0x6ce30e gimple_cond_get_ops_from_tree(tree_node*, tree_code*, tree_node**, tree_node**) /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/gcc/gimple-expr.c:566 0xbe94b4 gimple_build_cond_from_tree(tree_node*, tree_node*, tree_node*) /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/gcc/gimple.c:536 0x958ba7 c_parser_gimple_if_stmt /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/gcc/c/gimple-parser.c:2252 0x958ba7 c_parser_gimple_compound_statement /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/gcc/c/gimple-parser.c:418 0x958ba7 c_parser_gimple_compound_statement /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/gcc/c/gimple-parser.c:381 0x95a3a7 c_parser_parse_gimple_body(c_parser*, char*, c_declspec_il, profile_count) /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/gcc/c/gimple-parser.c:253 0x949537 c_parser_declaration_or_fndef /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/gcc/c/c-parser.c:2533 0x950db3 c_parser_external_declaration /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/gcc/c/c-parser.c:1777 0x951819 c_parser_translation_unit /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/gcc/c/c-parser.c:1650 0x951819 c_parse_file() /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/gcc/c/c-parser.c:21994 0x9b1f95 c_common_parse_file() /tmp/tmp.SQC1E9RsGE-gcc-builder/gcc/gcc/c-family/c-opts.c:1219 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.