https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120701
Bug ID: 120701 Summary: ICE at -O{2,3} on x86_64-linux-gnu: in verify_range, at value-range.cc:1546 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zhendong.su at inf dot ethz.ch Target Milestone: --- It seems to be a recent regression (and might be connected to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120661). [513] % gcctk -v Using built-in specs. COLLECT_GCC=gcctk COLLECT_LTO_WRAPPER=/local/home/suz/suz-local/software/local/gcc-trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/16.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --disable-bootstrap --enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk --enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 16.0.0 20250618 (experimental) (GCC) [514] % [514] % gcctk -O2 small.c during GIMPLE pass: dom small.c: In function ‘main’: small.c:2:5: internal compiler error: in verify_range, at value-range.cc:1546 2 | int main() { | ^~~~ 0x2530886 internal_error(char const*, ...) ../../gcc-trunk/gcc/diagnostic-global-context.cc:517 0x9f895e fancy_abort(char const*, int, char const*) ../../gcc-trunk/gcc/diagnostic.cc:1803 0x913273 irange::verify_range() ../../gcc-trunk/gcc/value-range.cc:1546 0x155b5bd irange_storage::get_irange(irange&, tree_node*) const ../../gcc-trunk/gcc/value-range-storage.cc:417 0xdd5e38 ssa_cache::get_range(vrange&, tree_node*) const ../../gcc-trunk/gcc/gimple-range-cache.cc:592 0xdd8a51 ranger_cache::range_of_def(vrange&, tree_node*, basic_block_def*) ../../gcc-trunk/gcc/gimple-range-cache.cc:1165 0xdd9dbc ranger_cache::edge_range(vrange&, edge_def*, tree_node*, ranger_cache::rfd_mode) ../../gcc-trunk/gcc/gimple-range-cache.cc:1230 0xdd39c3 gimple_ranger::range_on_edge(vrange&, edge_def*, tree_node*) ../../gcc-trunk/gcc/gimple-range.cc:266 0x1386810 path_range_query::ssa_range_in_phi(vrange&, gphi*) ../../gcc-trunk/gcc/gimple-range-path.cc:275 0x1386f9d path_range_query::range_defined_in_block(vrange&, tree_node*, basic_block_def*) ../../gcc-trunk/gcc/gimple-range-path.cc:299 0x1387191 path_range_query::compute_ranges_in_phis(basic_block_def*) ../../gcc-trunk/gcc/gimple-range-path.cc:343 0x1387854 path_range_query::compute_ranges_in_block(basic_block_def*) ../../gcc-trunk/gcc/gimple-range-path.cc:383 0x13884f8 path_range_query::compute_ranges(bitmap_head const*) ../../gcc-trunk/gcc/gimple-range-path.cc:588 0x141a4b2 hybrid_jt_simplifier::simplify(gimple*, gimple*, basic_block_def*, jt_state*) ../../gcc-trunk/gcc/tree-ssa-threadedge.cc:1312 0x14195e4 jump_threader::simplify_control_stmt_condition(edge_def*, gimple*) ../../gcc-trunk/gcc/tree-ssa-threadedge.cc:385 0x1419df2 jump_threader::thread_through_normal_block(vec<jump_thread_edge*, va_heap, vl_ptr>*, edge_def*, bitmap_head*, unsigned int&) ../../gcc-trunk/gcc/tree-ssa-threadedge.cc:843 0x141b34f jump_threader::thread_across_edge(edge_def*) ../../gcc-trunk/gcc/tree-ssa-threadedge.cc:975 0x12efb88 dom_opt_dom_walker::after_dom_children(basic_block_def*) ../../gcc-trunk/gcc/tree-ssa-dom.cc:1790 0x224f66f dom_walker::walk(basic_block_def*) ../../gcc-trunk/gcc/domwalk.cc:354 0x12f4995 execute ../../gcc-trunk/gcc/tree-ssa-dom.cc:939 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. [515] % [515] % cat small.c int a, b, c, e, f; int main() { int d, g, i; j: if (d >= 0) goto k; if (g >= 0) goto l; k: i = a + 3; m: f = 652685095 + 818172564 * g; if (-1101344938 * f - 1654872807 * d >= 0) goto n; goto l; o: if (i) { c = -b; if (-c >= 0) goto l; g = b; b = i + 5; if (b * c) goto n; goto o; } if (e) goto m; goto j; n: d = 978208086 * g - 1963072513; if (d + i) return 0; goto k; l: goto o; }