(j3.2006) ASSOCIATE and DO CONCURRENT LOCAL
Robert Corbett
robert.corbett
Thu May 26 18:15:48 EDT 2016
On 05/26/16 12:32, 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?
Yes.
The first occurrence of B is a construct entity of the ASSOCIATE
construct (paragraph 1 of Subclause 16.4 of 16-007). The second
occurrence of B is a construct entity of the DO construct
(paragraph 2 of Subclause 8.1.6.5). They are different entities.
The B that is the associate name is associated with the variable
identified by A. The B that is a construct entity of the DO
construct is not associated with the variable identified by A.
Robert Corbett
More information about the J3
mailing list