https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108855
Bug ID: 108855 Summary: [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1518 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.1 20230219 snapshot (g:b9c83e7789f7eec9871e370739baa55fd70be4cf) ICEs when compiling the following testcase w/ -O1: int m; int undefined (int); __attribute__ ((pure, returns_twice)) int bar (void) { m = 1; while (m) m = 2; return m; } int foo (void) { return undefined (bar ()); } % gcc-13 -O1 -c gl1ueszy.c during GIMPLE pass: dce gl1ueszy.c: In function 'foo': gl1ueszy.c:17:1: internal compiler error: in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1518 17 | foo (void) | ^~~ 0x77557c eliminate_unnecessary_stmts /var/tmp/portage/sys-devel/gcc-13.0.1_p20230219/work/gcc-13-20230219/gcc/tree-ssa-dce.cc:1518 0x77557c perform_tree_ssa_dce /var/tmp/portage/sys-devel/gcc-13.0.1_p20230219/work/gcc-13-20230219/gcc/tree-ssa-dce.cc:1951 0x102b6da tree_ssa_dce /var/tmp/portage/sys-devel/gcc-13.0.1_p20230219/work/gcc-13-20230219/gcc/tree-ssa-dce.cc:1986 0x102b6da execute /var/tmp/portage/sys-devel/gcc-13.0.1_p20230219/work/gcc-13-20230219/gcc/tree-ssa-dce.cc:2027