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 ()
21 if(associated(a
,a
)) call abort()
24 if (.not
.associated (b
)) call abort ()
28 integer, pointer, dimension(:, :, :) :: a
, b
31 ! Associated returns false because target is present (case(iii)).
32 if (associated (b
, a
)) call abort ()
36 if (.not
.associated (b
, a
)) call abort ()
41 character(len
=n
), pointer, dimension(:) :: a
, b
44 ! Again, with zero character length associated returns false
45 ! if target is present.
46 if (associated (b
, a
) .and
. (n
.eq
. 0)) call abort ()
48 if ((.not
.associated (b
, a
)) .and
. (n
.ne
. 0)) call abort ()