3 ! Check the fix for PR88143, in which the associate name caused
4 ! a segfault in resolve.c. Make sure that the associate construct
5 ! does its job correctly, as well as compiles.
7 ! Contributed by Andrew Wood <andrew@fluidgravity.co.uk>
12 INTEGER, DIMENSION(:), ALLOCATABLE
:: i
15 SUBROUTINE s(x
, idx1
, idx2
, k
)
16 CLASS(*), DIMENSION(:), INTENT(IN
), OPTIONAL
:: x
17 INTEGER :: idx1
, idx2
, k
20 ASSOCIATE ( j
=> x(idx1
)%i
)
28 class (t
), allocatable
:: c(:)
31 allocate (c(1)%i
, source
= [3,2,1])
32 allocate (c(2)%i
, source
= [6,5,4])