3 ! Test the fix for PR78293. The deallocations are present at the
4 ! end of the main programme to aid memory leak searching. The
5 ! allocation in 'tt' leaked memory from an intermediate temporary
6 ! for the array constructor.
8 ! Contributed by Andrew Benson <abensonca@gmail.com>
14 integer, allocatable
, dimension(:) :: r
21 type(t
), allocatable
, dimension(:) :: tt
22 type(t
), intent(in
), dimension(:) :: a
,b
23 allocate(tt
, source
= [a
,b
])
28 type(t
), allocatable
, dimension(:) :: ts
29 integer, intent(in
) :: arg(:)
31 allocate(ts(1)%r
, source
= arg
)
40 type(t
), dimension(2) :: c
41 c
=tt(ts([99,199,1999]),ts([42,142]))
42 if (any (c(1)%r
.ne
. [99,199,1999])) call abort
43 if (any (c(2)%r
.ne
. [42,142])) call abort