(j3.2006) Interop observation
Van Snyder
Van.Snyder
Mon Feb 6 18:07:02 EST 2012
A colleague has observed that it's not terribly difficult to construct a
duplicate definition using interop features.
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.
More information about the J3
mailing list