Link to the Compiler Explorer: https://godbolt.org/z/hWornT4aW Reproducer: unsigned e; extern int f[]; extern long g[]; void h() { for (int a(e);;) for (unsigned b = 0;;) for (short c = 0;;) for (short d = 0; d < 66; d++) if (d) { f[d] = 0; g[a * b * c + d] = 0; } } Error: >$ g++ -c -march=skylake-avx512 -O3 func.cpp during GIMPLE pass: threadfull func.cpp: In function 'void h()': func.cpp:4:6: internal compiler error: in range_on_path_entry, at gimple-range-path.cc:164 4 | void h() { | ^ 0x8c16b8 path_range_query::range_on_path_entry(vrange&, tree_node*) /testing/gcc/gcc_src_master/gcc/gimple-range-path.cc:164 0x140788d path_range_query::ssa_range_in_phi(vrange&, gphi*) /testing/gcc/gcc_src_master/gcc/gimple-range-path.cc:321 0x1406cc5 path_range_query::range_defined_in_block(vrange&, tree_node*, basic_block_def*) /testing/gcc/gcc_src_master/gcc/gimple-range-path.cc:348 0x1406f39 path_range_query::compute_ranges_in_phis(basic_block_def*) /testing/gcc/gcc_src_master/gcc/gimple-range-path.cc:394 0x1407a2b path_range_query::compute_ranges_in_block(basic_block_def*) /testing/gcc/gcc_src_master/gcc/gimple-range-path.cc:442 0x14083ca path_range_query::compute_ranges(vec<basic_block_def*, va_heap, vl_ptr> const&, bitmap_head const*) /testing/gcc/gcc_src_master/gcc/gimple-range-path.cc:673 0x148e99c back_threader::find_taken_edge_cond(vec<basic_block_def*, va_heap, vl_ptr> const&, gcond*) /testing/gcc/gcc_src_master/gcc/tree-ssa-threadbackward.cc:317 0x148f493 back_threader::maybe_register_path() /testing/gcc/gcc_src_master/gcc/tree-ssa-threadbackward.cc:231 0x148fa66 back_threader::find_paths_to_names(basic_block_def*, bitmap_head*, unsigned int) /testing/gcc/gcc_src_master/gcc/tree-ssa-threadbackward.cc:355 0x148fe94 back_threader::find_paths_to_names(basic_block_def*, bitmap_head*, unsigned int) /testing/gcc/gcc_src_master/gcc/tree-ssa-threadbackward.cc:471 0x14909bc back_threader::find_paths(basic_block_def*, tree_node*) /testing/gcc/gcc_src_master/gcc/tree-ssa-threadbackward.cc:529 0x1490c21 back_threader::thread_blocks() /testing/gcc/gcc_src_master/gcc/tree-ssa-threadbackward.cc:943 0x1490d08 execute /testing/gcc/gcc_src_master/gcc/tree-ssa-threadbackward.cc:1073 gcc version 13.0.0 20220812 (1595794f804ed3e925dcdf5f21b7fa762c74ca15)
Dup. *** This bug has been marked as a duplicate of bug 106593 ***