I think this code should compile:
Module modparadt Type, public :: xx(k) Integer, kind :: k integer(k), allocatable :: v(:) End type xx End Module modparadt Program Test use modparadt Type(xx(8)), pointer :: yy=>null() end Program Test
but when using ifort 17.07 and ifort 18.03 it stops with
tmp.f90(9): error #6197: An assignment of different structure types is invalid. [YY] Type(xx(8)), pointer :: yy=>null()
any comments. If this is a bug I'll launch a ticket pointing to this theard.
I too think it is a bug in Intel Fortran. And it persists in 19.0 Beta Update 1 as well.
For whatever it's worth, the following change where the initialization of the object in the declaration is replaced with a separate pointer assignment instruction. Intel Fortran compiles the code ok:
type(xx(k=8)), pointer :: yy yy => null()