(j3.2006) (SC22WG5.3655) [ukfortran] FW: Notes on WG5 coarray papers
Tue Nov 11 03:34:57 EST 2008
Reinhold Bader wrote:
> [discussion on restriction I want but cannot get]
> Do you think this is then only a matter of telling users
> "don't use volatile (array, derived type) coarrays thusly" or
> something which needs fixing in the standard in a more
> appropriate manner than suggested by me?
Probably more the latter than the former. I usually prefer to have less
ambiguity in my standards.
>>> Example 2.4 ("Protected Context") is non-conforming since the cited
>>> restriction is violated by the object in question being VOLATILE within
>>> the scope of the DO loop. This would apply even if the CASE(1) statements
>>> were not present.
>> There is no restriction that says a DO index variable cannot have the
>> VOLATILE attribute, and the "cited restriction" does not even mention
>> VOLATILE. So I cannot agree with your reasoning. (In fact I think the
>> example is conforming when used as described in the paper.)
> I don't agree with that one. Referring to 08-007r2, we have
> 5.3.19 para1: The VOLATILE attribute specifies that an object may be referenced,
> defined, or become undefined, by means not specified by the program,
> or by another image without synchronization.
> so if the DO index variable is volatile, it will by virtue of its volatility violate the cited
> restriction, won't it?
It only violates the restriction if it actually *IS* defined etc.
This is not a static restriction but a dynamic one.
> Or do you consider the program conforming (statistically
> conforming?) as long as simply by chance the index isn't stomped on by anyone
> else while DO executes?
That is *EXACTLY* what those words mean.
Like in the Fortran 90 program snippet
x = 0
x(j) = i
That is not conforming if the user types in a number <1 or >100
(subscript error) or ==50 (updating a DO index error); it is conforming
.........................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3