------- Comment #1 from kargl at gcc dot gnu dot org 2009-08-31 15:43 ------- (In reply to comment #0) > The following program produces a warning message in gfortran 4.3 and 4.4, but > not 4.5. I believe it produced a warning message in early versions of 4.5. > > PROGRAM test > IF(.TRUE.) THEN > GOTO 50 > 50 ENDIF > END PROGRAM test >
I believe that 4.3 and 4.4 had a bug. Gfortran 4.5 is doing the right thing. The deleted feature is (2) Branching to an END IF statement from outside its block. In Fortran 77, and for consistency also in Fortran 90, it was possible to branch to an END IF statement from outside the IF construct; this has been deleted. A similar result can be achieved by branching to a CONTINUE statement that is immediately after the END IF statement. Your GOTO 50 is inside the its block. I also believe that there was a long thread in fort...@gcc about this (non)feature. I'll see if I can find it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41198