summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr42119.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/pr42119.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/pr42119.f9024
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr42119.f90 b/gcc/testsuite/gfortran.dg/pr42119.f90
new file mode 100644
index 000000000..f848e9e9f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr42119.f90
@@ -0,0 +1,24 @@
+! { dg-do compile }
+
+module Test
+use ISO_C_BINDING
+
+contains
+
+subroutine Callback(arg) bind(C)
+ integer(C_INT) :: arg
+end subroutine Callback
+
+subroutine Check(proc)
+ type(C_FUNPTR) :: proc
+end subroutine Check
+
+end module Test
+
+
+program Main
+ use Test
+ type(C_FUNPTR) :: proc
+
+ call Check(C_FUNLOC(Callback))
+end program Main