summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/bind_c_array_params.f03
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/bind_c_array_params.f03')
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_array_params.f0314
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/bind_c_array_params.f03 b/gcc/testsuite/gfortran.dg/bind_c_array_params.f03
new file mode 100644
index 000000000..6590db1d1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bind_c_array_params.f03
@@ -0,0 +1,14 @@
+! { dg-do compile }
+module bind_c_array_params
+use, intrinsic :: iso_c_binding
+implicit none
+
+contains
+ subroutine sub0(assumed_array) bind(c) ! { dg-error "cannot be an argument" }
+ integer(c_int), dimension(:) :: assumed_array
+ end subroutine sub0
+
+ subroutine sub1(deferred_array) bind(c) ! { dg-error "cannot" }
+ integer(c_int), pointer :: deferred_array(:)
+ end subroutine sub1
+end module bind_c_array_params