I believe that it is part of the Fortran standard that optional arguments can be passed as optional arguments to other routines without having to check whether they are present - their present status is passed automatically.
But consider the following code, which does not work in either FTN95 or NAGWare. My understanding is that the call to s2 should definitely work, but what about the call to s3 at line 11? This generates an error message indicating that the optional arguments are undefined. Indeed the optional arguments are not passed to s1, but given that they are optional in s3 surely that should not matter.
PROGRAM m
!
CALL s1 ()
!
CONTAINS
!
SUBROUTINE s1 (i,j)
INTEGER, INTENT(IN), OPTIONAL :: i
INTEGER, DIMENSION(2), INTENT(IN), OPTIONAL :: j
CALL s2 (i1=i)
CALL s3 (j1=j(1),j2=j(2))
END SUBROUTINE s1
!
SUBROUTINE s2 (i1)
INTEGER, INTENT(IN), OPTIONAL :: i1
IF (PRESENT(i1)) THEN
PRINT *, i1
ELSE
PRINT *, 'N/A'
END IF
END SUBROUTINE s2
!
SUBROUTINE s3 (j1,j2)
INTEGER, INTENT(IN), OPTIONAL :: j1
INTEGER, INTENT(IN), OPTIONAL :: j2
IF (PRESENT(j1)) THEN
PRINT *, j1
ELSE
PRINT *, 'N/A'
END IF
IF (PRESENT(j2)) THEN
PRINT *, j2
ELSE
PRINT *, 'N/A'
END IF
END SUBROUTINE s3
END PROGRAM m