(j3.2006) Target attribute and components
Bill Long
longb
Thu Mar 19 18:55:38 EDT 2015
On Mar 19, 2015, at 5:20 PM, Van Snyder <Van.Snyder at jpl.nasa.gov> wrote:
> One of my colleagues just noticed the conspicuous absence of the TARGET
> attribute in the definition of <component-attr-spec> (R438 in 15-007).
>
> Was this intended, or is it an oversight?
This has come up multiple times, and each time the answer has been it is intended. Ultimately it is a question of whether the components are treated like separate objects, or are all part of a single object. I?d note that if a component separately had the TARGET attribute, the current argument association rules would be a bit of a mess for dummy variables of that type.
The inquiry usually comes from a user who has created a large derived type to collect together all of the variables relevant to some task. This is the ?separate objects? vision. There is interest to associate a pointer with one of the components, but not pollute the other components with the TARGET attribute. At least in the TARGET case, you can fake it using as ASSOCIATE construct, as long as the usage of the ?pointer? can be limited to the construct.
The same question comes up for the ASYNCHRONOUS and VOLATILE attributes. ASYNCHRONOUS is a problem since you would prefer to have all of the limitations associated with a variable actively involved in asynchronous I/O apply to only the component that is the list item in the READ or WRITE statement, and not all of the components of the structure.
>
> I told him to put the target attribute on objects of the type, but
> warned that might have impacts on optimization.
Indeed, it does.
Cheers,
Bill
>
>
> _______________________________________________
> 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 Suport & 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