http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53945
Bug #: 53945 Summary: Scalar element of assumed-shape dummy array not recognized as C interoperable Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: towns...@astro.wisc.edu (Reposting from an initial question in comp.lang.fortran): I'm having trouble getting the following to compile with gfortran 4.7.2: --SNIP-- program foo USE ISO_C_BINDING implicit none contains subroutine bar (a) real, intent(in), target :: a(:,:) type(C_PTR) :: a_ptr a_ptr = C_LOC(a(1,1)) end subroutine bar end program foo --SNIP-- The error message is: Error: Assumed-shape array 'a' at (1) cannot be an argument to the procedure 'c_loc' because it is not C interoperable This isn't right; although the array 'a' is not interoperable because it is assumed-shape (but not allocatable), the *element* a(1,1) is a scalar and thus should be interoperable. Looks like the same problem as 50269, in a slightly different context.