1! { dg-do compile } 2! { dg-options "-std=f2003" } 3subroutine aaa(in) 4 use iso_c_binding 5 implicit none 6 integer(KIND=C_int), DIMENSION(:), TARGET :: in 7 type(c_ptr) :: cptr 8 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" } 9end subroutine aaa 10