I reported the following code to NAG as a suspected error, since their compiler was complaining about the two subroutines s1 and s2 being indistinguishable.
Module m
Interface s
Module Procedure s1
Module Procedure s2
End Interface s
!
Contains
!
Subroutine s1 (i, c)
Integer, Intent(In) :: i
Character(Len=*), Intent(In) :: c
Return
End Subroutine s1
!
Subroutine s2 (c, i)
Character(Len=*), Intent(In) :: c
Integer, Intent(In) :: i
Return
End Subroutine s2
End Module m
The code compiles without an error in FTN95. However, NAG indicated that the code is incorrect because
Call s (i=i, c=c)
would be ambiguous since the ordering of the arguments does not matter even though the arguments are not optional. So perhaps FTN95 should issue a compilation error message?