Tracking bug, pending J3/WG5. See http://www.j3-fortran.org/doc/year/09/09-155.txt
Item F03/0129 (bottom). Gfortran currently rejects the following ("*1" to "*5"), the erratum will allow for (some?) of those (see link). Status: Passed by J3 meeting SUBROUTINE S(A,I,K) USE ISO_C_BINDING CHARACTER(*),TARGET :: A CHARACTER(:),ALLOCATABLE,TARGET :: B TYPE(C_PTR) P1,P2,P3,P4,P5 P1 = C_LOC(A(1:1)) ! *1 P2 = C_LOC(A(I:I)) ! *2 P3 = C_LOC(A(1:)) ! *3 P4 = C_LOC(A(I:K)) ! *4 ALLOCATE(CHARACTER(1)::B) P5 = C_LOC(B) ! *5 END SUBROUTINE -- Summary: Bind(C): C_LOC of character substrings (F2003 erratum, pending) Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org OtherBugsDependingO 32630 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39288