3 ! Test the fix for PR94022
6 function isasa_f(a
) result(s
)
9 integer, intent(in
) :: a(..)
22 function isasa_c(a
) result(s
) bind(c
)
23 use, intrinsic :: iso_c_binding
, only
: c_int
, c_bool
27 integer(kind
=c_int
), intent(in
) :: a(..)
29 logical(kind
=c_bool
) :: s
45 function isasa_f(a
) result(s
)
47 integer, intent(in
) :: a(..)
50 function isasa_c(a
) result(s
) bind(c
)
51 use, intrinsic :: iso_c_binding
, only
: c_int
, c_bool
53 integer(kind
=c_int
), intent(in
) :: a(..)
54 logical(kind
=c_bool
) :: s
58 integer, parameter :: sz
= 7
59 integer, parameter :: lb
= 3
60 integer, parameter :: ub
= 9
61 integer, parameter :: ex
= ub
-lb
+1
63 integer :: arr(sz
,lb
:ub
)
66 if (asaf_a(arr
, lb
+1, ub
-1)) stop 1
67 if (asaf_p(arr
, lb
+1, ub
-1)) stop 2
68 if (asaf_a(arr
, 2, ex
-1)) stop 3
69 if (asaf_p(arr
, 2, ex
-1)) stop 4
70 if (asac_a(arr
, lb
+1, ub
-1)) stop 5
71 if (asac_p(arr
, lb
+1, ub
-1)) stop 6
72 if (asac_a(arr
, 2, ex
-1)) stop 7
73 if (asac_p(arr
, 2, ex
-1)) stop 8
79 function asaf_a(a
, lb
, ub
) result(s
)
80 integer, intent(in
) :: lb
81 integer, target
, intent(in
) :: a(sz
,lb
:*)
82 integer, intent(in
) :: ub
86 s
= isasa_f(a(:,lb
:ub
))
90 function asaf_p(a
, lb
, ub
) result(s
)
91 integer, intent(in
) :: lb
92 integer, target
, intent(in
) :: a(sz
,lb
:*)
93 integer, intent(in
) :: ub
97 integer, pointer :: p(:,:)
104 function asac_a(a
, lb
, ub
) result(s
)
105 integer, intent(in
) :: lb
106 integer, target
, intent(in
) :: a(sz
,lb
:*)
107 integer, intent(in
) :: ub
111 s
= logical(isasa_c(a(:,lb
:ub
)))
115 function asac_p(a
, lb
, ub
) result(s
)
116 integer, intent(in
) :: lb
117 integer, target
, intent(in
) :: a(sz
,lb
:*)
118 integer, intent(in
) :: ub
122 integer, pointer :: p(:,:)
125 s
= logical(isasa_c(p
))