------- Comment #5 from dominiq at lps dot ens dot fr 2008-05-11 16:40 ------- For the record: after fixing the syntax errors, the executable gives an infinite loop when compiled with gfortran 4.3.0 on *i-apple-darwin9 and 4.4.0 (patched) on i686-apple-darwin9, but not on 4.4.0 (also patched) on powerpc-apple-darwin9. The infinite loop comes from a nasty (even for trained eyes) typo which leaves the intent(out) dummies xn and vn unset on return of subroutine step (since the code seems to be some homework, I leave the reporter complete the debugging himself).
The points of interest for the gfortran maintainers are: (1) are there other platforms on which there is no infinite loop? and if yes why? (2) I think the problem could be diagnosed at compiled time (possibly with -O only). If it can now, I did not find the right option. If not, should I open a pr along this line or would it deemed too difficult to implement? Final note, the code has at least another bug (hint: set n=2, d=3 and compile with -fbounds-check). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36192