submodule (mtop) submod implicit none real :: s contains module subroutine sub1 r = 0.0 end subroutine sub1 end