module tests
implicit none
contains
subroutine test01
integer :: i
real :: x(0:4)
x(0) = 1.0
do i = 1, 4
call rk4_ti_step_mod3 ( x(i-1), x(i) ) ! check n=10 bug.
end do
write (*,*)x
end subroutine test01
subroutine rk4_ti_step_mod3 ( x, xstar )
real :: x, xstar
xstar = x
xstar = xstar + x
!xstar = x + x
end subroutine rk4_ti_step_mod3
end module tests
program main
use tests
implicit none
call test01
end program main
I have changed the code like this one.