(j3.2006) Binding label consistency in module procedures

Bill Long longb
Mon May 23 16:09:49 EDT 2016


I think that is backwards. We allow two different interfaces to specify the same binding name. 

Steve?s example is ambiguous. I don?t see how we can allow that case.  

Cheers,
Bill



On May 23, 2016, at 2:48 PM, Van Snyder <Van.Snyder at jpl.nasa.gov> wrote:

> I believe it would be permitted for the procedure to have both binding
> names.  Didn't we have an interp that allows an external procedure that
> is declared with interface bodies in different scoping units to have
> different binding labels?
> 
> On Mon, 2016-05-23 at 14:32 +0000, Lionel, Steve wrote:
>> Consider:
>> 
>> 
>> 
>> module U610575A
>> 
>> interface
>> 
>> module subroutine sub1 () bind(C,name='SUB1')
>> 
>> end subroutine sub1
>> 
>> end interface
>> 
>> end module U610575A
>> 
>> 
>> 
>> submodule(U610575A) U610575AS
>> 
>> contains
>> 
>> module subroutine sub1 () bind(C,name='NOTSUB1')
>> 
>> end subroutine sub1
>> 
>> end submodule U610575AS
>> 
>> 
>> 
>> The standard says (F2008 12.4.3.2p7) for a specific interface that
>> ?the characteristics shall be consistent with those specified in the
>> procedure definition??. However, the list of procedure characteristics
>> (12.3.1) includes only ?whether it has the BIND attribute? and not the
>> value of NAME= in a language-binding-spec.
>> 
>> 
>> 
>> I don?t want to see the standard trying to enforce binding label
>> consistency in general, but I wondered if submodules should be a
>> special case. If a program tried to call sub1, it would probably fail
>> to link because of the name mismatch. Thoughts?
>> 
>> 
>> 
>> Steve Lionel
>> 
>> Intel Developer Support
>> 
>> Merrimack, NH
>> 
>> 
>> 
>> 
>> _______________________________________________
>> J3 mailing list
>> J3 at mailman.j3-fortran.org
>> http://mailman.j3-fortran.org/mailman/listinfo/j3
> 
> 
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3

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 mailing list