(j3.2006) Interop observation
Mon Feb 6 18:14:43 EST 2012
On 2/6/12 5:07 PM, Van Snyder wrote:
> A colleague has observed that it's not terribly difficult to construct a
> duplicate definition using interop features.
It is also not terribly difficult for the linker to inform you that,
assuming good aim, you now have only 4 toes left.
There was a thread on this topic a while ago.
> The example was
> SUBROUTINE AnyNamesubf(i)BIND(C,NAME="csubf_")
> USE, INTRINSIC :: iso_c_binding, ONLY: c_int
> INTEGER(c_int) :: i
> CALL Csubf(i)
> END SUBROUTINE AnyNamesubf
> where Csubf was a non-interoperable Fortran external subroutine.
> I don't think this is a normative issue for the standard, but should we
> put a note somewhere that might help people not create these? Maybe
> something like advising not to give binding names to Fortran procedures
> that are all lower case (or all upper case) and are sufficiently similar
> to the external names of non-interoperable Fortran external procedures
> that the linker might be sent the same name for both of them.
> J3 mailing list
> J3 at j3-fortran.org
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101
More information about the J3