In the following code, in a submodule a type is used defined in its module where it is not declared public. nvfortran stumbles over this, though that type should be in the same scope in the submodule when defined in its corresponding module. An obvious trivial workaround is to declare that variable public, but nevertheless that is not correct behavior by nvfortran.
module m
private
public :: iterator_t
! public :: node_t
type :: iterator_t
integer, dimension(:), allocatable :: key
contains
procedure :: init => iterator_init
end type iterator_t
type :: node_t
end type node_t
interface
module subroutine iterator_init (iterator)
class(iterator_t), intent(inout) :: iterator
end subroutine iterator_init
end interface
end module m
submodule (m) m_s
contains
module subroutine iterator_init (iterator)
class(iterator_t), intent(inout) :: iterator
type(node_t), pointer :: node
contains
recursive subroutine fill_key (node)
type(node_t), pointer :: node
end subroutine fill_key
end subroutine iterator_init
end submodule m_s