(j3.2006) DO CONCURRENT question

Lionel, Steve steve.lionel
Wed Nov 21 14:13:33 EST 2012

I am puzzled by some wording in the standard regarding DO CONCURRENT and hope one or more of you can shed some light on it., page 178, lines 5-7 say:

5 A variable that is referenced in an iteration shall either be previously defined during that iteration, or
6 shall not be defined or become undefined during any other iteration. A variable that is defined or becomes
7 undefined by more than one iteration becomes undefined when the loop terminates.

It then goes on to show in note 8.11:

A variable that is effectively local to each iteration of a DO CONCURRENT construct can be declared in
a BLOCK construct within it. For example:
T = A(I) + B(I)
C(I) = T + SQRT(T)

If the BLOCK were removed, so that T was a procedure scope variable, why wouldn't "previously defined during that iteration" be sufficient to effectively make T local to each iteration, negating the need here for BLOCK?  Or am I misreading this?

Steve Lionel
Intel Developer Support
Merrimack, NH

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.j3-fortran.org/pipermail/j3/attachments/20121121/6b41ecee/attachment.html 

More information about the J3 mailing list