(j3.2006) ASSOCIATE and DO CONCURRENT LOCAL

Van Snyder Van.Snyder
Thu May 26 15:35:44 EDT 2016


On Thu, 2016-05-26 at 19:32 +0000, Bill Long wrote:
> A question came up about ASSOCIATE interacting with OpenMP, but the same concept applies to the new DO CONCURRENT enhancements.   Suppose you have
> 
> A = 1
> ASSOCIATE ( B => A )
> 
>    DO CONCURRENT (i=1:1)  LOCAL (B) 
>  
>         X = A   ! B is undefined - does that cause A to be undefined as well?
>         B = 2   ! Does this cause A to change value?
> 
>    END DO
> 
> END ASSOCIATE 
> 
> print *, A, X
> end
> 
> Are there words in the standard to cover this interaction?

I hope they're there, under "BLOCK construct" or something related to it
in Clause 16, because that's what locality specs are (well, sort of,
except for the goofy inconsistency of attributes).

> 
> 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
> 
> 
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3





More information about the J3 mailing list