https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107301
Bug ID: 107301 Summary: [13 Regression] ICE in duplicate_block, at cfghooks.cc:1114 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: translation Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- gcc 13.0.0 20221016 snapshot (g:6366e3e8847af98d4728d55951534769d034d02a) ICEs when compiling the following testcase w/ -O2: __attribute__ ((pure, returns_twice)) int foo (int x) { int a; a = x ? 3 : 0; x /= a; a = foo (x); if (x == a) __builtin_unreachable (); return 0; } % gcc-13 -O2 -c ybzomcfk.c during GIMPLE pass: isolate-paths ybzomcfk.c: In function 'foo': ybzomcfk.c:2:1: internal compiler error: in duplicate_block, at cfghooks.cc:1114 2 | foo (int x) | ^~~ 0x6a97c8 duplicate_block(basic_block_def*, edge_def*, basic_block_def*, copy_bb_data*) /var/tmp/portage/sys-devel/gcc-13.0.0_p20221016/work/gcc-13-20221016/gcc/cfghooks.cc:1114 0x1d679dc isolate_path(basic_block_def*, basic_block_def*, edge_def*, gimple*, tree_node*, bool) /var/tmp/portage/sys-devel/gcc-13.0.0_p20221016/work/gcc-13-20221016/gcc/gimple-ssa-isolate-paths.cc:157 0x1d6970b find_implicit_erroneous_behavior /var/tmp/portage/sys-devel/gcc-13.0.0_p20221016/work/gcc-13-20221016/gcc/gimple-ssa-isolate-paths.cc:770 0x1d6970b gimple_ssa_isolate_erroneous_paths /var/tmp/portage/sys-devel/gcc-13.0.0_p20221016/work/gcc-13-20221016/gcc/gimple-ssa-isolate-paths.cc:932 0x1d6970b execute /var/tmp/portage/sys-devel/gcc-13.0.0_p20221016/work/gcc-13-20221016/gcc/gimple-ssa-isolate-paths.cc:987