Nvfortran cannot compile a linked list with the allocatable component

gfortran and ifort can compile the following code, nvfortran 22.3 cannot.

! Derived types for linked lists

! OK gfortran/ifort/nvfortran
type tLLp
integer i
type(tLLp),pointer :: next
end type

! OK gfortran/ifort, but nvfortran: Derived type component must have the POINTER attribute
type tLLa
integer i
type(tLLa),allocatable :: next
end type

type(tLLp),pointer :: llp
type(tLLa),allocatable :: lla

allocate(llp)
llp=tLLp(0,null())
allocate(llp%next)
llp%next=tLLp(1,null())
print *,llp%i,llp%next%i,associated(llp%next%next)

lla=tLLa(0,null())
lla%next=tLLa(1,null())
print *,lla%i,lla%next%i,allocated(lla%next%next)

end program

Hi lahan,

We don’t fully support F2008 including allocatable members of recursive types. This will be included in our next generation Fortran compiler which is being co-developed with the Flang community: llvm-project/flang at main · llvm/llvm-project · GitHub.

-Mat