[J3] Question about C_F_POINTER in 22-007

Van Snyder van.snyder at sbcglobal.net
Thu Feb 3 01:33:08 UTC 2022


On Wed, 2022-02-02 at 19:43 -0500, Steve Lionel via J3 wrote:
> On 2/2/2022 7:17 PM, Van Snyder via J3 wrote:
> 
> > 
> > 22-007 now allows an optional LOWER argument to C_F_POINTER to
> > specify the lower bounds of FPTR.
> > 
> > The description of FPTR says that its shape is specified by SHAPE.
> > Does SHAPE still specify the shape, or does it now specify the
> > upper bounds -- which was the same thing as upper bounds before
> > LOWER was added?
> > 
> > If it is now supposed to specify the upper bounds, significant
> > rewording of the shape of FPTR in Cases (i) and (ii) is necessary.
> > If it still specifies shape, not upper bounds, it is (confusingly)
> > not compatible with a pointer assignment statement.
> > 
> > This needs to be clarified before processors do incompatible
> > things.
> > 
> I don't see an issue. SHAPE has always been extent, not upper-bound.
> The rest of the text appears clear, to me, that SHAPE is "number of
> elements", for example, "FPTR becomes associated with the first
> PRODUCT (SHAPE) elements of T".

Right, but if the objective is to make C_F_POINTER more like pointer
assignment, then SHAPE ought to be interpreted as upper bound, in which
case some rewording would be necessary. Re-interpreting SHAPE to mean
"upper bound" would be compatible with Fortran 2018.
> 
> Steve

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20220202/5ee713b8/attachment-0001.htm>


More information about the J3 mailing list