aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/c_loc_tests_10.f03
blob: 21b8526c2ab8f2731ace61c5353545c4b477b855 (plain)
1
2
3
4
5
6
7
8
9
! { dg-do compile }
! { dg-options "-std=f2003" }
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 "Fortran 2008: Array of interoperable type at .1. to C_LOC which is nonallocatable and neither assumed size nor explicit size" }
end subroutine aaa