https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104757
--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> --- (In reply to Tobias Burnus from comment #3) > (In reply to Thomas Schwinge from comment #1) > > Confirmed ever since commit 48c6cac9caea1dc7c5f50ad3a736f6693e74a11b ... which added the testcase (by porting it from the C testcase). Testing with the reduced testcase shows: * FAILS since r12-5504-gd986ff50b4aad62c45d7ac62915e072643ddfca1 "Split return functionality of get_non_stale_global_range." (Nov 24, 2021) with the ICE mentioned before: during GIMPLE pass: walloca in gimple_range_global Before that version, it also gave an ICE - but at a different place: * FAILS since r12-2891-gd0befed793b94f3f407be44e6f69f81a02f5f073 "openmp: Add support for OpenMP 5.1 masked construct" (Aug 12, 2021) with the ICE during GIMPLE pass: ssa input.f90:15:3: internal compiler error: Segmentation fault 15 | end | ^ 0xf6e773 crash_signal ../../repos/gcc/gcc/toplev.c:328 0x11b9652 verify_ssa(bool, bool) ../../repos/gcc/gcc/tree-ssa.c:1076 0xe7ecf5 execute_function_todo ../../repos/gcc/gcc/passes.c:2049 * Before that commit and with the current GCC 11 branch, it works. * * * Current-mainline backtrace: during GIMPLE pass: walloca gcc/foo.f90:13:14: 13 | ll = ll +1 | ^ internal compiler error: Segmentation fault 0x100e6d3 crash_signal ../../repos/gcc/gcc/toplev.cc:322 0x132478e gimple_range_global(tree_node*) ../../repos/gcc/gcc/value-query.cc:424 0x1d2d9e0 ranger_cache::get_global_range(irange&, tree_node*) const ../../repos/gcc/gcc/gimple-range-cache.cc:923 0x1d2d9e0 ranger_cache::get_global_range(irange&, tree_node*) const ../../repos/gcc/gcc/gimple-range-cache.cc:919 0x1d2975a gimple_ranger::export_global_ranges() ../../repos/gcc/gcc/gimple-range.cc:474 0x1d6bdbc pass_walloca::execute(function*) ../../repos/gcc/gcc/gimple-ssa-warn-alloca.cc:381 Or in the debugger: 0x000000000132478e in gimple_range_global (name=name@entry=0x7ffff6fd1798) at ../../repos/gcc/gcc/gimple.h:1243 1243 return gs->code == GIMPLE_PHI; (gdb) bt #0 0x000000000132478e in gimple_range_global (name=name@entry=0x7ffff6fd1798) at ../../repos/gcc/gcc/gimple.h:1243 #1 0x0000000001d2d9e1 in ranger_cache::get_global_range (this=0x28, name=0x7ffff6fd1798, r=...) at ../../repos/gcc/gcc/gimple-range-cache.cc:923 #2 ranger_cache::get_global_range (this=this@entry=0x2f09288, r=..., name=name@entry=0x7ffff6fd1798) at ../../repos/gcc/gcc/gimple-range-cache.cc:919 #3 0x0000000001d2975b in gimple_ranger::export_global_ranges (this=this@entry=0x2f09260) at ../../repos/gcc/gcc/gimple-range-fold.h:98 #4 0x0000000001d6bdbd in pass_walloca::execute (this=0x2ee9050, fun=0x7ffff71be000) at ../../repos/gcc/gcc/gimple-ssa-warn-alloca.cc:381 #5 0x0000000000f1c1bc in execute_one_pass (pass=0x2ee9050) at ../../repos/gcc/gcc/passes.cc:2637 #6 0x0000000000f1c980 in execute_pass_list_1 (pass=0x2ee9050) at ../../repos/gcc/gcc/passes.cc:2737 #7 0x0000000000f1c9bd in execute_pass_list (fn=0x7ffff71be000, pass=<optimized out>) at ../../repos/gcc/gcc/passes.cc:2748 #8 0x0000000000b4d379 in cgraph_node::analyze (this=0x7ffff71c1000) at ../../repos/gcc/gcc/context.h:48 #9 0x0000000000b50592 in analyze_functions (first_time=<optimized out>) at ../../repos/gcc/gcc/cgraphunit.cc:1240 #10 0x0000000000b51082 in symbol_table::finalize_compilation_unit (this=0x7ffff6fcd000) at ../../repos/gcc/gcc/cgraphunit.cc:2500 #11 0x000000000100e9f4 in compile_file () at ../../repos/gcc/gcc/toplev.cc:479 #12 0x0000000000919e1c in do_compile (no_backend=false) at ../../repos/gcc/gcc/toplev.cc:2168