https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93950
Bug ID: 93950 Summary: ICE: in make_region_for_unexpected_tree_code, at analyzer/region-model.cc:4786 with -fanalyzer Product: gcc Version: 10.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 47916 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47916&action=edit reduced testcase (from OpenTTD sources) Compiler output: $ x86_64-pc-linux-gnu-g++ testcase.C -fanalyzer during IPA pass: analyzer testcase.C:10:11: internal compiler error: in make_region_for_unexpected_tree_code, at analyzer/region-model.cc:4786 10 | void *j = nullptr; | ^ 0x8b188d ana::region_model::make_region_for_unexpected_tree_code(ana::region_model_context*, tree_node*, dump_location_t const&) /repo/gcc-trunk/gcc/analyzer/region-model.cc:4786 0x8b188d ana::region_model::make_region_for_unexpected_tree_code(ana::region_model_context*, tree_node*, dump_location_t const&) /repo/gcc-trunk/gcc/analyzer/region-model.cc:4782 0x169f0cd ana::region_model::get_lvalue_1(ana::path_var, ana::region_model_context*) /repo/gcc-trunk/gcc/analyzer/region-model.cc:4650 0x169f6c3 ana::region_model::get_lvalue(ana::path_var, ana::region_model_context*) /repo/gcc-trunk/gcc/analyzer/region-model.cc:4811 0x1e8852d ana::state_change_event::get_lvalue(tree_node*) const /repo/gcc-trunk/gcc/analyzer/checker-path.h:206 0x1e8852d ana::diagnostic_manager::prune_for_sm_diagnostic(ana::checker_path*, ana::state_machine const*, tree_node*, unsigned int) const /repo/gcc-trunk/gcc/analyzer/diagnostic-manager.cc:1160 0x1e8876e ana::diagnostic_manager::prune_path(ana::checker_path*, ana::state_machine const*, tree_node*, unsigned int) const /repo/gcc-trunk/gcc/analyzer/diagnostic-manager.cc:1056 0x1e88a2f ana::diagnostic_manager::emit_saved_diagnostic(ana::exploded_graph const&, ana::saved_diagnostic const&, ana::exploded_path const&, gimple const*, int) /repo/gcc-trunk/gcc/analyzer/diagnostic-manager.cc:520 0x1e894ce ana::dedupe_winners::emit_best(ana::diagnostic_manager*, ana::exploded_graph const&) /repo/gcc-trunk/gcc/analyzer/diagnostic-manager.cc:446 0x1e894ce ana::diagnostic_manager::emit_saved_diagnostics(ana::exploded_graph const&) /repo/gcc-trunk/gcc/analyzer/diagnostic-manager.cc:489 0x1681248 ana::impl_run_checkers(ana::logger*) /repo/gcc-trunk/gcc/analyzer/engine.cc:3807 0x1681fcc ana::run_checkers() /repo/gcc-trunk/gcc/analyzer/engine.cc:3850 0x16766e8 execute /repo/gcc-trunk/gcc/analyzer/analyzer-pass.cc:84 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-g++ -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-g++ COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20200226101433-gb9934ad88d6-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.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 --disable-bootstrap --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-20200226101433-gb9934ad88d6-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.0.1 20200226 (experimental) (GCC)