The following code compiles in FTN95 without any errors or warnings, while other compilers either issue an error or a warning.
I don't think this is a major problem (in terms of the executable generated by FTN95), but the programmer's error is not detected.
program main
implicit none
real :: a(5) = (/1,2,3,4,5/)
real b
interface
subroutine f(r,s)
real, intent(out) :: r(:) !'IN' in subroutine
real, intent(in) :: s !'OUT' in subroutine
end subroutine !Should the complier not detect this discrepancy?
end interface
call f(a,b)
print*, 'sum = ', b
end program main
subroutine f(r,s)
real, intent(in) :: r(:) !'OUT' in interface block
real, intent(out):: s !'IN' in interface block
s = sum(r)
end subroutine