https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89253
Bug ID: 89253
Summary: [8/9 Regression] ICE in split_loop, at
tree-ssa-loop-split.c:566
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
gfortran-9.0.0-alpha20190203 snapshot (r268503) ICEs when compiling the
following (not necessarily valid) testcase w/ -O1 -fsplit-loops
-fno-tree-dominator-opts:
program jr
integer :: w5, pg, zh
w5 = 0
write (w5)
assign 0002 to w5
do pg = 1, 3
if (pg .eq. 1) then
do zh = 1, pg
end do
else
goto w5
0001 zh = 0
0002 zh = 0
assign 0001 to w5
endif
end do
end
% powerpc-e300c3-linux-gnu-gfortran-9.0.0-alpha20190203 -O1 -fsplit-loops
-fno-tree-dominator-opts -w -c mvxcktth.f
during GIMPLE pass: lsplit
mvxcktth.f:1:0:
1 | program jr
|
internal compiler error: in split_loop, at tree-ssa-loop-split.c:566
0x688b22 split_loop
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/tree-ssa-loop-split.c:566
0x688b22 tree_ssa_split_loops
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/tree-ssa-loop-split.c:654
0x688b22 execute
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190203/work/gcc-9-20190203/gcc/tree-ssa-loop-split.c:708
(While my target here is powerpc, the ICE is not target-specific.)
BTW, while -fsplit-loops is enabled at -O3 and higher, it is not documented as
such in the user's manual.