From: Mikael Morin <morin-mikael@orange.fr>
To: Harald Anlauf <anlauf@gmx.de>
Cc: fortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fortran: fix invalid rank error in ASSOCIATED when rank is remapped [PR77652]
Date: Mon, 25 Jul 2022 20:08:30 +0200 [thread overview]
Message-ID: <cc82482b-9735-ca48-6a2b-4f7c6a31de1b@orange.fr> (raw)
In-Reply-To: <trinity-c3b41188-1f8e-47c5-8b58-75c8cfa9bf9c-1658764864841@3c-app-gmx-bap61>
Le 25/07/2022 à 18:01, Harald Anlauf a écrit :
> Hi Mikael, all,
>
> a discussion in the Intel compiler forum suggests that the F2018
> standard prohibits such use of the ASSOCIATED intrinsic.
>
> https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-rejects-ASSOCIATED-pointer-target-for-non-equal-ranks/m-p/1402799/highlight/true#M162159
>
I disagree with the conclusion. Quoting Steve Lionel’s post:
> What you're missing is this:
>
> TARGET (optional) shall be allowable as the data-target or proc-target in a pointer assignment statement (10.2.2) in which POINTER is data-pointer-object or proc-pointer-object.
>
> We then go to 10.2.2 which says (emphasis mine):
>
> C1019 (R1033) If bounds-remapping-list is not specified, the ranks of data-pointer-object and data-target shall be the same.
>
> So... not valid Fortran 2018.
except, that there is also this:
> C1018 (R1033) If bounds-remapping-list is specified, the number of bounds-remappings shall equal the rank of data-pointer-object.
which practically imposes no conformance rule between
data-pointer-object and data-target.
Note that in the syntax definition, bounds-remapping-list is not part of
data-pointer-object. In other words, by collating a
bounds-remapping-list next to POINTER, one can construct an allowable
pointer assignment from TARGET to POINTER, which satisfies the
requirement, even if TARGET and POINTER don’t have the same rank.
next prev parent reply other threads:[~2022-07-25 18:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-21 20:12 Harald Anlauf
2022-07-25 10:43 ` Mikael Morin
2022-07-25 16:01 ` Harald Anlauf
2022-07-25 18:08 ` Mikael Morin [this message]
2022-07-25 20:18 ` Harald Anlauf
2022-07-26 19:25 ` Mikael Morin
2022-07-27 19:45 ` [PATCH, v2] " Harald Anlauf
2022-07-27 19:45 ` Harald Anlauf
2022-07-27 19:50 ` Toon Moene
2022-07-28 20:19 ` Mikael Morin
2022-07-29 20:01 ` Harald Anlauf
2022-07-29 20:01 ` Harald Anlauf
2022-07-30 10:03 ` Mikael Morin
2022-07-30 14:13 ` Toon Moene
2022-07-30 18:35 ` Harald Anlauf
2022-07-30 18:35 ` Harald Anlauf
2022-08-04 12:03 ` Mikael Morin
2022-08-18 19:32 ` Harald Anlauf
2022-08-18 19:32 ` Harald Anlauf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cc82482b-9735-ca48-6a2b-4f7c6a31de1b@orange.fr \
--to=morin-mikael@orange.fr \
--cc=anlauf@gmx.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).