Debian Codegraph @

gcc/testsuite/gfortran.dg/c_loc_tests_10.f03

raw
1 ! { dg-do compile }
2 ! { dg-options "-std=f2003" }
3 subroutine 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" }
9 end subroutine aaa