I have this test code, which should be compiled with nvfortran 24.11:
module m
implicit none
private
type :: foo_t
integer :: x = 0
contains
procedure :: do_stuff
end type foo_t
type(foo_t), parameter :: this_foo = foo_t(0)
interface
module subroutine do_stuff (foo)
class(foo_t), intent(in) :: foo
end subroutine do_stuff
end interface
end module m
The compilation fails with this error message:
NVFORTRAN-F-0155-No default initialization in structure constructor- member do_stuff$tbp$1 (constructor.f90: 12)
I’m not entirely sure if the code is correct as it is, since there is no implementation of do_stuff
. However, gfortran compiles fine.