summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/c_ptr_tests_8.f03
blob: 3b99ee8bb0f40998d439197fbdd098384827e7e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! { dg-do run }
! { dg-additional-sources c_ptr_tests_8_funcs.c }
program main
use iso_c_binding, only: c_ptr
implicit none
interface
  function create() bind(c)
    use iso_c_binding, only: c_ptr
    type(c_ptr) :: create
  end function create
  subroutine show(a) bind(c)
    import :: c_ptr
    type(c_ptr), VALUE :: a
  end subroutine show
end interface

type(c_ptr) :: ptr
ptr = create()
call show(ptr)
end program main