(j3.2006) Can initial-data-target be coindexed?

Bill Long longb
Thu Aug 13 16:10:05 EDT 2015


You can deduce this is not allowed because pointer-assigning a pointer to a target on a different image causes the association status of the pointer to become undefined (16.5.2.5).  That contradicts the concept of the pointer being ?initialized?.   But, it would be clearer to incorporate the restriction in this case into a constraint.   Note that the constraint is a bit stronger - the ?different image? limitation would still allow this on image 3.  However, the initialization occurs on every image, so the program would be nonconforming.  It is simpler and clearer to say ?not coindexed?. 

Cheers,
Bill


On Aug 13, 2015, at 2:24 PM, Lionel, Steve <steve.lionel at intel.com> wrote:

>  
> So? what in the standard disallows the following?
>  
> program test
> integer, save, target :: C[*]
> integer, pointer :: P => C[3]
> end
>  
> Shouldn?t there be a constraint ?An initial-data-target shall not be a coindexed object??
>  
> I looked through interpretations and saw no discussion of this. Interp fodder?
>  

Bill Long                                                                       longb at cray.com
Fortran Technical Support  &                                  voice:  651-605-9024
Bioinformatics Software Development                     fax:  651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101





More information about the J3 mailing list