Description
Currently there are constraints preventing the use of polymorphism in coarrays. Specifically
C917 (R911) Except as an actual argument to an intrinsic inquiry function or as the designator in a type parameter inquiry, a data-ref shall not be a coindexed object that has a polymorphic allocatable potential subobject component.
and
C918 Except as an actual argument to an intrinsic inquiry function or as the designator in a type parameter inquiry, if the rightmost part-ref is polymorphic, no other part-ref shall be coindexed.
I suspect that it would be possible to rewrite these constraints in such a way to allow reference to a polymorphic entity on another image without allowing one image to perform an allocation on another. My proposed rewriting would be
C917 If data-ref is a coindexed object that has a polymorphic allocatable potential subobject component it shall not appear in a variable definition context
and
C918 If the rightmost part-ref is polymorphic and any other part-ref is coindexed, the data-ref shall not appear in a variable definition context.
I'm not sure if I've got the wording quite right, but I think this is doable.