summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/c_loc_tests_10.f03
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/c_loc_tests_10.f03')
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_tests_10.f038
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_10.f03 b/gcc/testsuite/gfortran.dg/c_loc_tests_10.f03
new file mode 100644
index 000000000..867ba18cc
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_loc_tests_10.f03
@@ -0,0 +1,8 @@
+! { dg-do compile }
+subroutine aaa(in)
+ use iso_c_binding
+ implicit none
+ integer(KIND=C_int), DIMENSION(:), TARGET :: in
+ type(c_ptr) :: cptr
+ cptr = c_loc(in) ! { dg-error "not C interoperable" }
+end subroutine aaa