(j3.2006) 08-267
Van Snyder
van.snyder
Tue Sep 23 22:48:38 EDT 2008
Jim Xia wrote:
>
> j3-bounces at j3-fortran.org wrote on 09/23/2008 06:33:36 PM:
>
> > On Tuesday 23 September 2008 15:31, Michael Ingrassia wrote:
> > > Where do we say this?
> > In a note, since it can be inferred from normative text.
> > > Is it true that a coarray's dynamic type never changes?
> > > If not, can't we get a counterexample by considering coarray X
> > > with its dynamic type both just before and just after the dynamic type
> > > changes?
> > No, because changing the type requires an ALLOCATE statement
> (polymorphic
> > co-arrays have to be allocatable), which is a synchronization point.
>
>
> Sure you can get coarrays of different dynamic types on different
> images using the syntax like the following
>
> ALLOCATE (coarray[*], source=expr(image_number()))
>
This means we should prohibit
class(my_type), intent(in) :: x[*]
select type ( x )
type is ( my_extension )
print *, x[1]%extra_stuff
end select
because the dynamic type of X might be different from the type of X[1].
Or... we should prohibit SOURCE= and MOLD= for coarray allocations.
> where expr() is a function that return polymorphic allocatables whose
> dynamic types dependent on image index number. I don't see anything
> in the standard preventing this. But since we disabled the usage of
> polymorphic coindexed objects, I don't see any problems of this. Did
> I miss something here?
>
The problem is that without being able to reference coindexed
polymorphic objects, e.g. as
select type ( x=>x[1] )
type is ( my_extension )
print *, x%extra_stuff
end select
and without SELECT TYPE as above, the only components that can be
accessed are those of the declared type. So we might as well prohibit
declaring polymorphic coarrays.
> Cheers,
>
> Jim Xia
>
> RL Fortran Compiler Test
> IBM Toronto Lab at 8200 Warden Ave, Markham, On, L6G 1C7
> Phone (905) 413-3444 Tie-line 313-3444
> email: jimxia at ca.ibm.com
> D2/YF7/8200 /MKM
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://j3-fortran.org/pipermail/j3/attachments/20080923/0d448f04/attachment.html
More information about the J3
mailing list