I found that gfortran allows return
statement in the main program of fortran, but ifort does not allow this, giving compiling errors.
I do not understand the reason why ifort does not like the return statement in the main program, considering that return
is useful when I want to finish the execution before the program reaching the last line of code.
Does ifort recommend better ways to early terminate the main program. Is it stop
?
Is this gfortran behavior a non-standard extension, which extends the use of return
from procedures to the main program?