(j3.2006) associate name

Steidel, Jon L jon.l.steidel
Fri Apr 28 14:11:07 EDT 2017


Hi Bill,

I find nothing that covers the case of lbound/ubound of an unallocated object which is referenced thru an associate name, so I believe you have found a hole that needs a fix.

-jon

> -----Original Message-----
> From: j3-bounces at mailman.j3-fortran.org [mailto:j3-bounces at mailman.j3-
> fortran.org] On Behalf Of Bill Long
> Sent: Friday, April 28, 2017 1:35 PM
> To: fortran standards email list for J3 <j3 at mailman.j3-fortran.org>
> Subject: Re: (j3.2006) associate name
> 
> Yes, but the question is about the description of the LBOUND function itself.
> It appears to not cover the case of an associate name associated with an
> unallocated allocatable or an unassociated pointer.
> 
> Cheers,
> Bill
> 
> On Apr 28, 2017, at 12:05 PM, Rafik Zurob <rzurob at ca.ibm.com> wrote:
> 
> > Hi Bill
> >
> > Section 8.1.3.3 "Other attributes of associate names" contains:  "The
> > lower bound of each dimension is the result of the intrinsic function
> > LBOUND (13.8.100) applied to the corresponding dimension of selector."
> > So
> > lbound(assoc_name) is defined as lbound(x), and lbound(x) as you
> > pointed out requires that x be associated.
> >
> > Regards
> >
> > Rafik
> >
> > j3-bounces at mailman.j3-fortran.org wrote on 28/04/2017 12:05:04 PM:
> >
> >> From: Bill Long <longb at cray.com>
> >> To: fortran standards email list for J3 <j3 at mailman.j3-fortran.org>
> >> Date: 28/04/2017 12:05 PM
> >> Subject: (j3.2006) associate name
> >> Sent by: j3-bounces at mailman.j3-fortran.org
> >>
> >> Consider
> >>
> >> real,pointer :: x(:)
> >>
> >> associate (assoc_name => x)
> >>  print *, lbound(assoc_name), ubound(assoc_name) end associate
> >>
> >> end
> >>
> >> The rules for LBOUND and UBOUND require that the argument be
> >> associated if it is a pointer.  But the assoc_name is not a pointer
> >> according to the f2015 text. It's just a variable with the TARGET
> >> attribute.  And it is a rank-1 array.  But, clearly, does not have
> >> sensible bounds defined.   Is this a case we missed, or is there
> >> some other rule I'm no seeing that prohibits these lbound and ubound
> >> references?
> >>
> >> Cheers,
> >> Bill
> >>
> >> Bill Long
> >> longb at cray.com
> >> Principal Engineer, Fortran Technical Support &   voice:  651-605-9024
> >> Bioinformatics Software Development                      fax:
> > 651-605-9143
> >> Cray Inc./ 2131 Lindau Lane/  Suite 1000/  Bloomington, MN  55425
> >>
> >>
> >> _______________________________________________
> >> J3 mailing list
> >> J3 at mailman.j3-fortran.org
> >> http://mailman.j3-fortran.org/mailman/listinfo/j3
> >>
> >
> >
> > _______________________________________________
> > J3 mailing list
> > J3 at mailman.j3-fortran.org
> > http://mailman.j3-fortran.org/mailman/listinfo/j3
> 
> Bill Long                                                                       longb at cray.com
> Principal Engineer, Fortran Technical Support &   voice:  651-605-9024
> Bioinformatics Software Development                      fax:  651-605-9143
> Cray Inc./ 2131 Lindau Lane/  Suite 1000/  Bloomington, MN  55425
> 
> 
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3



More information about the J3 mailing list