1 ! Test the dependency checking in simple where. This
2 ! did not work and was fixed as part of the patch for
9 integer :: d(3) = (/1, 2, 3/)
10 equivalence (a(1), b(1)), (a(2), c(1))
12 ! This classic case worked before the patch.
14 where (b
.gt
. 1) a(2:4) = a(1:3)
15 if (any(a
.ne
. (/1,2,2,3/))) call abort ()
17 ! This is the original manifestation of the problem
18 ! and is repeated in where_19.f90.
23 if (any(a
.ne
. (/1,2,2,3/))) call abort ()
25 ! Mask to.destination dependency.
30 if (any(a
.ne
. (/1,2,2,3/))) call abort ()
32 ! Source to.destination dependency.
37 if (any(a
.ne
. (/1,2,2,3/))) call abort ()
39 ! Check the simple where.
41 where (b
.gt
. 1) c
= b
42 if (any(a
.ne
. (/1,2,2,3/))) call abort ()
44 ! This was OK before the patch.
51 if (any(a
.ne
. (/1,2,2,3/))) call abort ()