[J3] US-12 apparently incomplete

John Reid John.Reid at stfc.ac.uk
Sun Aug 22 11:06:38 UTC 2021


Dear all,

Sorry to be slow to reply to this.

I have come to the conclusion that a problem occurs if an 
<allocate-object> is unlimited polymorphic and is given a dynamic type 
with a coarray ultimate component by <type-spec> or <source-expr>. This 
could mean that whether the ALLOCATE statement is an image control 
statement is dynamic. The same goes for the DEALLOCATE statement for the 
object. We need to disallow this. We could effect this by keeping

C953 (R932) The declared type of <source-expr> shall not have a coarray 
ultimate component.

and adding a similar constraint on <type-spec>, but this is too big a 
club because an <allocate-object> might be a polymorphic variable with a 
declared type that has a coarray ultimate component, or there might be 
other <allocate-object>s that make the statement an image control 
statement.

I suggest deleting C953 and adding this text
"If no <allocate-object> is a coarray or has a type with a coarray 
ultimate component and an <allocate-object> is unlimited polymorphic, 
the dynamic type of neither <type-spec> nor <source-expr> shall have a 
coarray ultimate component."

While working on this, I have found what I think are minor problems with 
the way ALLOCATE and DEALLOCATE  are described when they are image 
control statements. I will work with HPC to prepare a paper for the 
October meeting.

Cheers,

John.

John Reid wrote:
> Malcolm,
>
> I will try to get an answer to you tomorrow, but I will not have much 
> time and it is not an area that I find at all easy.
>
> Sorry not to be quicker.
>
> John.
>
>
> Malcolm Cohen via J3 wrote:
>>
>> Hi folks,
>>
>> Paper 19-250r1 added allocatable entities containing coarray 
>> components, and thus deleted the constraint (on ALLOCATE) that 
>> type-spec shall not have an ultimate allocatable component.
>>
>> However, the constraint further down remains:
>>
>> C953 (R932) The declared type of /source-expr /shall not have a 
>> coarray ultimate component.
>>
>> Presumably (?) this should be part of C952, and thus apply only to 
>> SOURCE= (where it would be problematic) and not to MOLD= (where it is 
>> not problematic).
>>
>> Cheers,
>>
>> -- 
>>
>> ..............Malcolm Cohen, NAG Oxford/Tokyo.
>>
>



More information about the J3 mailing list