!======================================================================= ! FILE: INTENT1.F90 ! DATE: 20 July 2001 ! ! TEST: Check whether modifying a variable associated with a ! INTENT(IN) argument is detected - Case 1. ! ! Author/contact: Arnaud Desitter !======================================================================= module m2 contains subroutine s2(x) real, intent(inout) :: x x = 1. 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 inout. call s2(x) end subroutine s3