3 ! Test the fix for PR66679.
5 ! Contributed by Miha Polajnar <polajnar.miha@gmail.com>
9 class(*), allocatable :: vec(:)
10 integer :: var, ans(2)
11 allocate(vec(2),source=[1_4, 2_4])
13 ! This worked correctly.
14 if (any (transfer(vec,[var],2) .ne. [1_4, 2_4])) stop 1
17 if (any ([transfer(vec(1),[var]), transfer(vec(2),[var])] .ne. [1_4, 2_4])) stop 2