https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104159
Bug ID: 104159 Summary: ICE: in finalize, at vector-builder.h:513 with -O -fanalyzer Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Created attachment 52255 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52255&action=edit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -O -fanalyzer testcase.c during IPA pass: analyzer testcase.c: In function 'foo': testcase.c:12:13: internal compiler error: in finalize, at vector-builder.h:513 12 | t = (T){} + u + u; | ~~~^~~ 0x1632ec6 vector_builder<tree_node*, tree_node*, tree_vector_builder>::finalize() /repo/gcc-trunk/gcc/vector-builder.h:513 0x163251d tree_vector_builder::build() /repo/gcc-trunk/gcc/tree-vector-builder.cc:42 0xfcc53c native_interpret_vector_part /repo/gcc-trunk/gcc/fold-const.cc:8764 0xfe9bd2 fold_view_convert_vector_encoding /repo/gcc-trunk/gcc/fold-const.cc:9130 0xfe9bd2 fold_view_convert_expr /repo/gcc-trunk/gcc/fold-const.cc:9150 0xfe9bd2 const_unop(tree_code, tree_node*, tree_node*) /repo/gcc-trunk/gcc/fold-const.cc:1753 0xfdf392 fold_unary_loc(unsigned int, tree_code, tree_node*, tree_node*) /repo/gcc-trunk/gcc/fold-const.cc:9255 0x17560a2 ana::region_model_manager::maybe_fold_unaryop(tree_node*, tree_code, ana::svalue const*) /repo/gcc-trunk/gcc/analyzer/region-model-manager.cc:429 0x17563ba ana::region_model_manager::get_or_create_unaryop(tree_node*, tree_code, ana::svalue const*) /repo/gcc-trunk/gcc/analyzer/region-model-manager.cc:458 0x173c49c ana::region_model::get_rvalue(ana::path_var, ana::region_model_context*) const /repo/gcc-trunk/gcc/analyzer/region-model.cc:1880 0x173e448 ana::region_model::get_rvalue(tree_node*, ana::region_model_context*) const /repo/gcc-trunk/gcc/analyzer/region-model.cc:1895 0x173e448 ana::region_model::get_gassign_result(gassign const*, ana::region_model_context*) /repo/gcc-trunk/gcc/analyzer/region-model.cc:701 0x173f0dc ana::region_model::on_assignment(gassign const*, ana::region_model_context*) /repo/gcc-trunk/gcc/analyzer/region-model.cc:870 0x171a648 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::uncertainty_t*, ana::path_context*) /repo/gcc-trunk/gcc/analyzer/engine.cc:1305 0x171d84f ana::exploded_graph::process_node(ana::exploded_node*) /repo/gcc-trunk/gcc/analyzer/engine.cc:3694 0x171e822 ana::exploded_graph::process_worklist() /repo/gcc-trunk/gcc/analyzer/engine.cc:3137 0x1720d26 ana::impl_run_checkers(ana::logger*) /repo/gcc-trunk/gcc/analyzer/engine.cc:5716 0x1721b9e ana::run_checkers() /repo/gcc-trunk/gcc/analyzer/engine.cc:5787 0x1711148 execute /repo/gcc-trunk/gcc/analyzer/analyzer-pass.cc:87 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-6785-20220120234803-g6f45deb2aed-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.1/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-6785-20220120234803-g6f45deb2aed-checking-yes-rtl-df-extra-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.0.1 20220121 (experimental) (GCC)