3 ! Test the fix for PR84523.
5 ! Contributed by Harald Anlauf <anlauf@gmx.de>
9 integer, parameter :: nspots
= 80
11 real, allocatable
:: vm(:,:,:)
15 type(t_spot
), pointer :: spots(:) => NULL ()
18 call construct (col
, nspots
)
20 !========================================================================
22 !========================================================================
23 subroutine construct (rc
, nh
)
24 type(t_rowcol
) ,intent(out
) :: rc
! row or column to set
25 integer ,intent(in
) :: nh
! number of spots in a row
27 allocate (rc
%spots(nh
))
28 end subroutine construct
29 !------------------------------------------------------------------------
30 subroutine destruct (rc
)
31 type(t_rowcol
) ,intent(inout
) :: rc
! row or column to free
33 if (associated (rc
%spots
)) then
34 if (size(rc
%spots
) .ne
. nspots
) stop 1
35 do k
=1, size(rc
% spots
)
36 if (allocated (rc
%spots(k
)%vm
)) stop 2 ! Would segfault in runtime.
41 end subroutine destruct