[J3] Does LHS of a pointer assignment have the POINTER attribute?
Daniel C Chen
cdchen at ca.ibm.com
Fri Oct 8 02:21:59 UTC 2021
Hi Bob,
It is actually
fp(1:) => tar
I am trying to figure out if the LHS, fp(1:) has the POINTER attribute.
Daniel Chen
XL Fortran Development, Fortran Standard Representative
IBM Toronto Software Lab
Phone: 905-413-3056
Tie: 969-3056
Email: cdchen at ca.ibm.com
From: "Robert Corbett via J3" <j3 at mailman.j3-fortran.org>
To: "General J3 interest list" <j3 at mailman.j3-fortran.org>
Cc: "Robert Corbett" <rpcorbett at att.net>
Date: 2021-10-07 04:30 PM
Subject: [EXTERNAL] Re: [J3] Does LHS of a pointer assignment have the
POINTER attribute?
Sent by: "J3" <j3-bounces at mailman.j3-fortran.org>
Did you mean fp(1:) = tar instead of fp(1:) => tar ? We discussed this
topic in the last meeting. We decided that c_sizeof(fp) should be
considered equivalent to c_sizeof((fp)) . Bob Corbett On Oct 7, 2021, at
9:57 AM, Daniel C Chen via J3
Did you mean
fp(1:) = tar
instead of
fp(1:) => tar
?
We discussed this topic in the last meeting.
We decided that
c_sizeof(fp)
should be considered equivalent to
c_sizeof((fp))
.
Bob Corbett
On Oct 7, 2021, at 9:57 AM, Daniel C Chen via J3
<j3 at mailman.j3-fortran.org> wrote:
Consider the following code:
use iso_c_binding
integer, pointer :: fp(:)
integer, target :: tar(10)
fp => tar
fp(1:) => tar
print *, c_sizeof(fp(:)) ! case 1: conforming
print *, c_sizeof(fp) ! case 2: not conforming
print *, c_sizeof(fp(1:)) ! case 3: ??
end
fp(1:) can appear as the LHS of a pointer assignment, does it mean
fp(1:) have the POINTER attribute? If so, case 3 is not conforming as
POINTER is not interoperable.
Thanks,
Daniel Chen
XL Fortran Development, Fortran Standard Representative
IBM Toronto Software Lab
Phone: 905-413-3056
Tie: 969-3056
Email: cdchen at ca.ibm.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20211007/79bb5f58/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20211007/79bb5f58/attachment.gif>
More information about the J3
mailing list