[J3] Meaning of "within a DO CONCURRENT construct"
Van Snyder
van.snyder at sbcglobal.net
Fri Sep 6 20:52:17 UTC 2024
On Fri, 2024-09-06 at 10:55 +0100, John Reid via J3 wrote:
> Malcolm,
>
> I think that no edit to the standard is needed.
>
> C1143 (11.1.7.5 Additional semantics for DO CONCURRENT constructs)
> says:
> "A reference to an impure procedure shall not appear within a DO
> CONCURRENT construct."
> This refers to the whole construct. If it had intended to refer just
> to
> the block, it would have done so. For example, 11.1.7.4.3, para 3,
> uses
> "The block of a DO CONCURRENT construct".
If "(R1119)" were added to C1143 there would be no question.
A revision to the syntax rules and two constraints in 11.1.7.2 would be
more precise:
R1119 <no change in the existing three lines>
or do-concurrent-construct
R1120 do-stmt is [ do-construct-name : ] DO do-label [ loop-control ]
R1121 do-label is [ label ]
R1122 do-concurrent-construct is concurrent-stmt
block
end-do
R1123a concurrent-stmt is [ do-construct-name : ] DO do-label concurrent-loop-control
R1123b concurrent-loop-control is [,] CONCURRENT concurrent-header concurrent-locality
Remove the text of R1122b from R1123.
Insert "or concurrent-stmt of a do-concurrent-construct" after "do-
stmt of a do-construct" in C1135 twice.
C1135 would need revision (or duplication).
C1136 (R1121) If do-label does not appear, the corresponding end-
do shall be an end-do-stmt.
C1137 (R1121) If do-label appears, the corresponding end-do shall be
identified with the same label.
Write "do-label", R1121, and C1137 in obscolescent font. Put
"(R1122)" in C1143.
Some simplifications and clarifications might be possible elsewhere by
referring to do-concurrent-construct instead of do-construct.
Replace "DO CONCURRENT construct" with "do-concurrent-construct" in
C1140-C1146 in 11.1.7.5, C1134, C1139, amd C1172, and replacing "DO
CONCURRENT statement" with "do-concurrent-stmt" in C1126, C1127, C1133
and C1134.
>
> 11.1.7.4.2, begins with "The concurrent-limit and concurrent-step
> expressions in the concurrent-control-list are evaluated. These
> expressions may be evaluated in any order." This is why C1143 needs
> to
> include the header.
>
> I hope you agree.
>
> Cheers,
>
> John.
>
>
> Malcolm Cohen via J3 wrote:
> > Hi John,
> >
> > You say it is clear enough, but I cannot work out from your message
> > what you think the answer should be.
> >
> > The constraint does not say "within the block of a DO CONCURRENT
> > construct", so therefore it applies to the expressions in the
> > concurrent-header. Is that what you mean? That does appear to be
> > what the worms say...
> >
> > Cheers,
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20240906/86b90871/attachment.htm>
More information about the J3
mailing list