4 ! Passing of NULL() with and without MOLD as actual argument
6 ! Testcase derived from pr55978 comment#16
11 integer, pointer :: p(:)
12 integer, allocatable
:: a(:)
13 character(10), pointer :: c
14 character(10), pointer :: cp(:)
17 integer, pointer :: p(:)
18 integer, allocatable
:: a(:)
31 ! (3) pointer component
36 call sub (null (a
)) ! OK
37 call sub (null (p
)) ! OK
38 call sub (null (d
%a
)) ! OK
39 call sub (null (d
%p
)) ! OK
40 call sub (null ()) ! was erroneously rejected with:
41 ! Actual argument contains too few elements for dummy argument 'x' (1/4)
44 call bla (null()) ! was erroneously rejected with:
45 ! Actual argument contains too few elements for dummy argument 'x' (1/10)
51 call bar (null()) ! was erroneously rejected with:
52 ! Actual argument contains too few elements for dummy argument 'x' (1/70)
57 integer, intent(in
), optional
:: x(4)
58 if (present (x
)) stop 1
62 character(len
=10), intent(in
), optional
:: x
63 if (present (x
)) stop 2
67 character(len
=10), intent(in
), optional
:: x(:)
68 if (present (x
)) stop 3
72 character(len
=10), intent(in
), optional
:: x(7)
73 if (present (x
)) stop 4