3 ! Tests functionality of recursive allocatable derived types.
4 ! Here the recursive components are arrays, unlike the first three testcases.
5 ! Notice that array components are fiendishly difficult to use :-(
9 type(recurses), allocatable :: c(:)
10 integer, allocatable :: ia
15 type(recurses), allocatable, target :: a, d(:)
16 type(recurses), pointer :: b1
20 ! Check chained allocation.
35 call move_alloc (d, a%c(2)%c)
37 if (a%ia .ne. 1) STOP 1
38 if (a%c(1)%ia .ne. 2) STOP 2
39 if (a%c(2)%c(1)%ia .ne. 3) STOP 3
40 if (a%c(2)%c(2)%ia .ne. 4) STOP 4
41 if (a%c(2)%c(2)%c(1)%ia .ne. 5) STOP 5
43 if (allocated (a)) deallocate (a)
44 if (allocated (d)) deallocate (d)