2 ! Tests the implementation of 13.14.13 of the f95 standard
3 ! in respect of zero character and zero array length.
5 ! Contributed by Paul Thomas <pault@gcc.gnu.org>
13 integer, pointer, dimension(:, :, :) :: a, b
16 ! Even though b is zero length, associated returns true because
17 ! the target argument is not present (case (i))
18 if (.not. associated (b)) call abort ()
22 if (.not.associated (b)) call abort ()
26 integer, pointer, dimension(:, :, :) :: a, b
29 ! Associated returns false because target is present (case(iii)).
30 if (associated (b, a)) call abort ()
34 if (.not.associated (b, a)) call abort ()
39 character(len=n), pointer, dimension(:) :: a, b
42 ! Again, with zero character length associated returns false
43 ! if target is present.
44 if (associated (b, a) .and. (n .eq. 0)) call abort ()
46 if ((.not.associated (b, a)) .and. (n .ne. 0)) call abort ()