3 ! Test the fix for PR84155 and PR84141.
5 ! Contributed by Juergen Reuter <juergen.reuter@desy.de>
12 integer, dimension(:), allocatable
:: child
14 procedure
:: write_raw
=> particle_write_raw
18 type(array_t
), dimension(:), allocatable
:: array
24 type(container_t
) :: container
25 integer :: unit
, check
26 integer, parameter :: ival
= 42
28 allocate (container
%array(1))
29 allocate (container
%array(1)%child (1), source
= [ival
])
32 open (unit
, action
="readwrite", form
="unformatted", status
="scratch")
33 call container
%array(1)%write_raw (unit
)
37 if (ival
.ne
. check
) STOP 1
40 subroutine particle_write_raw (array
, u
)
41 class(array_t
), intent(in
) :: array
42 integer, intent(in
) :: u
44 end subroutine particle_write_raw
46 subroutine particle_read_raw (array
)
47 class(array_t
), intent(out
) :: array
48 allocate (array
%child (1)) ! comment this out
49 end subroutine particle_read_raw