program p
character(120) :: buffer
integer :: i(4)
type t(a)
integer, len :: a
end type
type t2(b)
integer, len :: b
type(t(1)) :: r(b)
end type
type(t2(3)) :: x
write (buffer,*) x
read (buffer,*) i
if (any (i .ne. [3,1,1,1])) stop 1
end
presumes the WRITE will output the value of the type parameter B followed by the values of the component array R(B), judging from the subsequent READ and IF test. But this is not correct; intrinsic output of a PDT does not include type parameters. See PR84143
The
pdt_22.f90
testpresumes the WRITE will output the value of the type parameter B followed by the values of the component array R(B), judging from the subsequent READ and IF test. But this is not correct; intrinsic output of a PDT does not include type parameters. See PR84143