aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/c_ptr_tests_8.f03
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.dg/c_ptr_tests_8.f03')
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/c_ptr_tests_8.f0320
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/c_ptr_tests_8.f03 b/gcc-4.9/gcc/testsuite/gfortran.dg/c_ptr_tests_8.f03
new file mode 100644
index 000000000..3b99ee8bb
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.dg/c_ptr_tests_8.f03
@@ -0,0 +1,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