(j3.2006) Redundant constraint?

Malcolm Cohen malcolm
Thu Aug 3 02:53:17 EDT 2017


Alternatively, maybe C1528 is just wrongly worded, as currently it does not forbid

 

                CALL coarray[1]%pointer%allocpoly % binding

 

but it (and C917) do forbid

 

                CALL coarray[1]%allocatable%allocpoly % binding

 

The type-bound procedure in question needs to be NOPASS otherwise 15.5.4.2p2 makes it invalid, viz ?If the actual argument is a polymorphic coindexed object, the dummy argument shall not be polymorphic."; but it certainly looks like the first example is valid and provides type dispatch through a polymorphic allocatable (or pointer) on a remote image.

 

I don?t see anything in the second example that looks harder to implement, or more full of pitfalls, than the first; which makes me wonder whether C1528 should have been

  ?(R1522) A data-ref shall not be a polymorphic coindexed object.?

???

 

Perhaps the vendor(s) who have polymorphics, type-bound procedures and coarrays working would like to venture an opinion on whether they allow the first example above, and if not, what requirement in the standard do they think it violates?  And do they allow the second example (though there is no doubt that it violates C917 as well as the existing version of C1528).

 

(I can supply test programs if that is thought useful?)

 

Cheers,

-- 

..............Malcolm Cohen, NAG Oxford/Tokyo.

 

From: j3-bounces at mailman.j3-fortran.org [mailto:j3-bounces at mailman.j3-fortran.org] On Behalf Of Malcolm Cohen
Sent: Thursday, August 3, 2017 1:06 PM
To: 'fortran standards email list for J3' <j3 at mailman.j3-fortran.org>
Subject: (j3.2006) Redundant constraint?

 

Hi folks,

 

C1528 says ?(R1522) A data-ref shall not be a polymorphic subobject of a coindexed object.?

 

(R1522 is procedure-designator and data-ref only appears when followed by % binding-name, so this only applies to type-bound procedure invocation.

 

HOWEVER, C917 says

                ?a data-ref shall not be a polymorphic subobject of a coindexed object?

everywhere except

?as an actual argument to an intrinsic inquiry function or as the designator in a type parameter inquiry?

which rather obviously includes prohibiting it in a procedure-designator.

 

So it seems to me that C1528 is completely superfluous as well as unnecessarily redundant.

 

Unless I have overlooked something, C1528 should either be deleted, or replaced by a NOTE ?In data-ref % binding-name, data-ref cannot be a polymosphic subobject of a coindexed object?.

 

Cheers,

-- 

..............Malcolm Cohen, NAG Oxford/Tokyo.

 

 

Disclaimer

The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.j3-fortran.org/pipermail/j3/attachments/20170803/5017bcb9/attachment-0001.html 



More information about the J3 mailing list