Is a plain RETURN statement (without any arguments) just before END SUBROUTINE in large legacy codes a good practice or should we just remove it?
The code I am working with is a big legacy code (for scientific computing) where parts of the code were originally written with Fortran 77, while majority new development is in Fortran 95 and above. There is some interspersed C code an Python scripting as well.
The Intel developer guide clearly mentions that End Subroutine already initiates Return: https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-end
On the other hand, I remember having been taught in 2000s that it is always good practice to specify an explicit RETURN statement before END SUBROUTINE.
Typical subroutine structure is mentioned as follows (e.g., Chapman's Fortran for Scientists and Engineers, 4th Edition):
SUBROUTINE subroutine_name ( argument_list )
...
(Declaration section)
...
(Execution section)
...
RETURN
END SUBROUTINE [subroutine_name]
If Return statement (without any arguments) is not a good practice then why even mention it as part of the structure, especially outside the "Execution section"? CYCLE or EXIT etc. are never mentioned as part of a standard Subroutine structure. So, why the RETURN?