1 ! { dg-do run { target c99_runtime } }
2 ! { dg-additional-sources ISO_Fortran_binding_9.c }
4 ! Fix a problem with CFI_is_contiguous
6 ! Contributed by Gilles Gouaillardet <gilles@rist.or.jp>
10 function cdesc_f08(buf
, expected
) result (res
) BIND(C
, name
="cdesc_c")
11 USE, INTRINSIC :: ISO_C_BINDING
14 type(*), dimension(..), INTENT(IN
) :: buf
15 integer(kind
=kind(loc(res
))),INTENT(IN
) :: expected
16 end function cdesc_f08
23 integer :: a0
, a1(10), a2(10,10), a3(10,10,10)
24 if (cdesc_f08(a0
, LOC(a0
)) .ne
. 1) stop 1
25 if (cdesc_f08(a1
, LOC(a1(1))) .ne
. 1) stop 2
26 if (cdesc_f08(a2
, LOC(a2(1,1))) .ne
. 1) stop 3
27 if (cdesc_f08(a3
, LOC(a3(1,1,1))) .ne
. 1) stop 4