OSDN Git Service

PR fortran/30964
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / c_ptr_tests_8.f03
1 ! { dg-do run }
2 ! { dg-additional-sources c_ptr_tests_8_funcs.c }
3 program main
4 use iso_c_binding, only: c_ptr
5 implicit none
6 interface
7   function create() bind(c)
8     use iso_c_binding, only: c_ptr
9     type(c_ptr) :: create
10   end function create
11   subroutine show(a) bind(c)
12     import :: c_ptr
13     type(c_ptr), VALUE :: a
14   end subroutine show
15 end interface
16
17 type(c_ptr) :: ptr
18 ptr = create()
19 call show(ptr)
20 end program main