https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103107
Bug ID: 103107 Summary: [12 Regression] ICE: tree check: expected class 'expression', have 'exceptional' (constructor) in prepare_debug_expressions, at ipa-param-manipulation.c:1189 Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz CC: marxin at gcc dot gnu.org Target Milestone: --- Host: x86_64-pc-linux-gnu Created attachment 51742 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51742&action=edit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -Og -g -fipa-sra -fno-tree-dce testcase.c In function 'bar.isra': cc1: internal compiler error: tree check: expected class 'expression', have 'exceptional' (constructor) in prepare_debug_expressions, at ipa-param-manipulation.c:1189 0x7e2a2b tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) /repo/gcc-trunk/gcc/tree.c:8739 0x7037bd expr_check(tree_node*, char const*, int, char const*) /repo/gcc-trunk/gcc/tree.h:3602 0x7037bd ipa_param_body_adjustments::prepare_debug_expressions(tree_node*) /repo/gcc-trunk/gcc/ipa-param-manipulation.c:1189 0x11162c2 ipa_param_body_adjustments::prepare_debug_expressions(tree_node*) /repo/gcc-trunk/gcc/ipa-param-manipulation.c:1164 0x111725d ipa_param_body_adjustments::common_initialization(tree_node*, tree_node**, vec<ipa_replace_map*, va_gc, vl_embed>*) /repo/gcc-trunk/gcc/ipa-param-manipulation.c:1365 0x13dc391 tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) /repo/gcc-trunk/gcc/tree-inline.c:6307 0xe8dfcd cgraph_node::materialize_clone() /repo/gcc-trunk/gcc/cgraphclones.c:1141 0xe7c7f5 cgraph_node::get_untransformed_body() /repo/gcc-trunk/gcc/cgraph.c:3907 0xe87f0d cgraph_node::expand() /repo/gcc-trunk/gcc/cgraphunit.c:1799 0xe87f0d cgraph_node::expand() /repo/gcc-trunk/gcc/cgraphunit.c:1781 0xe89597 expand_all_functions /repo/gcc-trunk/gcc/cgraphunit.c:1992 0xe89597 symbol_table::compile() /repo/gcc-trunk/gcc/cgraphunit.c:2356 0xe8c067 symbol_table::compile() /repo/gcc-trunk/gcc/cgraphunit.c:2269 0xe8c067 symbol_table::finalize_compilation_unit() /repo/gcc-trunk/gcc/cgraphunit.c:2537 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. $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-4968-20211106001624-g851dff042a2-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld --with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-r12-4968-20211106001624-g851dff042a2-checking-yes-rtl-df-extra-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.0.0 20211106 (experimental) (GCC)