submodule(parent) child2 implicit none contains module procedure my_sub2 a = 2 end procedure my_sub2 end submodule child2