4 Likes
This might be a good reference for Fortran compiler developers @certik .
The infinite-loop detecting and visualizing are very interesting. If only similar detection were available for F77 code with tons of GOTO’s. I had to find many of them manually when carving PRIMA out of Powell’s F77 codebase with 249 GOTO’s. It was time-consuming and, indeed, depressing.
1 Like
Just for the sake of curiosity, do those better warning messages work for Fortran, or are they limited to C/C++?
I have just tried -fanalyzer
in Fedora 42 with GFortran 15.0.1. The following code does not generate any warning:
do while(.true.)
print *, "-"
end do
2 Likes