(j3.2006) IEEE and the GPU world

Bill Long longb
Sun Aug 29 16:41:34 EDT 2010



Van Snyder wrote:
> Bill Long wrote:

>> Declaring IEEE_ARITHMETIC to be INTEGER seems like a hack.  It might be 
>> clearer if there were something more like USE,exclude :: 
>> IEEE_ARITHMETIC,  or even UNUSE :: IEEE_ARITHMETIC.
>>   
> 
> It's a hack, but not a new feature.  It works now.  Maybe.  
> [10-007:444:21-22] says "any entity of the host that has this as its 
> nongeneric name is inaccessible by that name by host association."  So 
> if IEEE_ARITHMETIC is not accessible by that name, are the things gotten 
> from it, but perhaps not mentioned in an ONLY clause, still accessible, 
> or not?
> 
> I assume that if a scoping unit has accessed the IEEE modules, any 
> scoping units in it access them too.  Otherwise putting a USE statement 
> in a module wouldn't get the IEEE features into its module procedures.   
> So putting a USE for the IEEE features in a procedure also gets those 
> features into its BLOCK constructs.  So "scoping unit," not "inclusive 
> scope" seems to be the correct term.
> 

It is uglier than that.  If a module has a USE of the IEEE_ARITHMETIC 
module, and that module (possibly through several other modules) is used 
in a subprogram, then the IEEE_ARITHMETIC module is accessible there. 
Even though the author of that procedure had no idea that is the case 
(since there are no visible references to entities in the module).    I 
believe that John's original points were that (1) the current wording in 
the standard is not very consistent to start with, and (2) this side 
effect might not have been foreseen.  Some clean-up for (1) is desirable 
in any event.   For (2), it might be desirable to limit the effects of 
the USE to subprograms where it explicitly appears, and maybe module 
procedures where the USE appears in the module. That would be a start.

Cheers,
Bill





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