https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109075
Bug ID: 109075
Summary: [13 Regression] rnflow hangs at -O3
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: tkoenig at gcc dot gnu.org
Target Milestone: ---
rnflow from the pb11 Polyhedron benchmark hangs at -O3 with recent trunk,
gcc-Version 13.0.1 20230308 (experimental) [master revision
e87559d202d:f4e6da6e8ac:36ec54aac7da134441c83248e14825381b8d6f17] (GCC)
Compiling with -O3 -g, running under gdb and interrupting the program
sometime after
(gdb) r rnflow.in
Starting program: /tmp/a.out rnflow.in
0: 0: 0.000 -> Read sequence
0: 0: 0.213 -> extract extrema
0: 0: 0.215 -> Generate raw transitions counts
0: 0: 0.221 -> Compute Markov matrix
0: 0: 0.221 -> Calculate theoretical rainflow
0: 0: 7.487 -> Simulate random markov sequences
^C
Program received signal SIGINT, Interrupt.
0x0000000000402149 in minlst (ipos2=<optimized out>, ipos1=<optimized out>) at
rnflow.f90:3698
3698 if (xxtrt (ipos) < xxtrt (minlst)) then
(gdb) l
3693 !
3694 ! .. dernier minimum de xxtrt entre ipos1 et ipos2
3695 !
3696 minlst = ipos2
3697 do ipos = ipos2 - 1, ipos1, -1
3698 if (xxtrt (ipos) < xxtrt (minlst)) then
3699 minlst = ipos
3700 endif
3701 enddo
3702 end function minlst
where it goes into an endless loop. This happens both on x86_64 and
on POWER.