Here are a couple related bugs with the 18.4 compiler.
The first valid F95 example triggers an internal compiler error:
$ pgfortran pgi-dflt-init-1.f90
PGF90-S-0000-Internal compiler error. dinits:bad dt 54 (pgi-dflt-init-1.f90: 10)
PGF90-S-0000-Internal compiler error. assem.c-put_skip old,new not in sync 16 (pgi-dflt-init-1.f90: 10)
0 inform, 0 warnings, 2 severes, 0 fatal for map_type
module map_type
type :: item
type(item), pointer :: next => null(), prev => null()
end type
type :: map
type(item), pointer :: first => null()
end type
type :: parameter_list
type(map) :: params = map() ! this default initializaton causes the ICE
end type
end module
The second example adds a final subroutine (F2003). This is incorrectly rejected by the compiler:
$ pgfortran pgi-dflt-init-2.f90
PGF90-F-0155-Empty structure constructor() - type map (pgi-dflt-init-2.f90: 11)
PGF90/x86-64 Linux 18.4-0: compilation aborted
module map_type
type :: item
type(item), pointer :: next => null(), prev => null()
contains
final :: item_delete
end type
type :: map
type(item), pointer :: first => null()
end type
type :: parameter_list
type(map) :: params = map() ! VALID EMPTY CONSTRUCTOR REJECTED BY PGFORTRAN
end type
contains
subroutine item_delete(this)
type(item), intent(inout) :: this
end subroutine
end module