https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106866
Bug ID: 106866 Summary: [13 Regression] ICE in predicate::init_from_control_deps Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- gcc 13.0.0 20220904 snapshot (g:20d30e737ad79dc36817e59f1676aa8bc0c6b325) ICEs when compiling the following testcase w/ -O1 -fno-ipa-pure-const -Wuninitialized: int n; void empty (int) { } int bar (int x) { return n + x + 1; } __attribute__ ((pure, returns_twice)) int foo (void) { int uninitialized; if (n) { if (bar (0)) return 0; __builtin_unreachable (); } while (uninitialized < 1) { foo (); empty (bar (0) == foo ()); ++uninitialized; } return 0; } % gcc-13.0.0 -O1 -fno-ipa-pure-const -Wuninitialized -c ur6q8z0f.c during GIMPLE pass: uninit ur6q8z0f.c: In function 'foo': ur6q8z0f.c:15:1: internal compiler error: Segmentation fault 15 | foo (void) | ^~~ 0xee887f crash_signal /var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/toplev.cc:314 0x1d1e068 gimple_code /var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/gimple.h:1806 0x1d1e068 predicate::init_from_control_deps(vec<edge_def*, va_heap, vl_ptr> const*, unsigned int, bool) /var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/gimple-predicate-analysis.cc:1734 0x1d1eec8 predicate::init_from_control_deps(vec<edge_def*, va_heap, vl_ptr> const*, unsigned int, bool) /var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/gimple-predicate-analysis.cc:1680 0x1d1eec8 uninit_analysis::init_use_preds(predicate&, basic_block_def*, basic_block_def*) /var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/gimple-predicate-analysis.cc:1946 0x1d22250 uninit_analysis::is_use_guarded(gimple*, basic_block_def*, gphi*, unsigned int, hash_set<gphi*, false, default_hash_traits<gphi*> >*) /var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/gimple-predicate-analysis.cc:2095 0x1d22869 uninit_analysis::is_use_guarded(gimple*, basic_block_def*, gphi*, unsigned int) /var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/gimple-predicate-analysis.cc:2136 0x113d741 find_uninit_use /var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/tree-ssa-uninit.cc:1238 0x113e08e warn_uninitialized_phi /var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/tree-ssa-uninit.cc:1308 0x113e08e execute_late_warn_uninitialized /var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/tree-ssa-uninit.cc:1426 0x113e08e execute /var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/tree-ssa-uninit.cc:1442