------- Comment #2 from burnus at gcc dot gnu dot org 2008-11-22 19:03 ------- Another code which is not rejected. If the parent procedure is called by a contained procedure there must be a recursion:
subroutine test() call sub() contains subroutine sub() call test() end subroutine sub end subroutine test NAG f95 detects this: Error: hfjf.f90, line 7: Invalid recursive self-reference to TEST as does openf95: openf95-343 openf95: ERROR SUB, File = hfjf.f90, Line = 5, Column = 10 A RECURSIVE keyword must be declared for a subprogram so that the subprogram can be called recursively. ifort, g95 and gfortran accept this program. (Can be also moved into a different PR.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37779