!======================================================================= ! FILE: INTENT2.F90 ! DATE: 21 July 2003 ! ! TEST: Check whether association of INTENT(IN) argument with a ! variable passed with INTENT(OUT) is detected ! ! Author/contact: Arnaud Desitter !======================================================================= module m2 contains subroutine s2(x) real, intent(out) :: x x = 2. end subroutine s2 end module m2 module m1 contains subroutine s1(x) real, intent(in) :: x call s3(x) end subroutine s1 end module m1 program main use m1 real :: x x = 4. call s1(x) write(unit=*,fmt=*) x end program main subroutine s3(x) use m2 real :: x ! x in s2 is out. call s2(x) end subroutine s3