1! PR 101305
2! { dg-do run }
3! { dg-additional-sources "establish-c.c dump-descriptors.c" }
4! { dg-additional-options "-g" }
5!
6! This program tests the CFI_establish function.  All the interesting
7! things happen in the corresponding C code.
8
9! Eventually we might want to make the C code pass the descriptors back to
10! C-callable Fortran functions, but for now it just checks them internally.
11
12module mm
13  use iso_c_binding
14
15  type, bind (c) :: s
16    integer(C_INT) :: i, j
17  end type
18end module
19
20
21program testit
22  use iso_c_binding
23  use mm
24  implicit none
25
26  interface
27
28    subroutine ctest_establish () bind (c)
29    end subroutine
30
31  end interface
32
33  call ctest_establish ()
34
35end program
36