From: Mikael Morin <morin-mikael@orange.fr>
To: Harald Anlauf <anlauf@gmx.de>, fortran <fortran@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: Proxy ping [PATCH] Fortran: Fix function attributes [PR100132]
Date: Tue, 20 Sep 2022 11:28:35 +0200 [thread overview]
Message-ID: <87c697b6-bc0a-0424-473d-9b64ecade073@orange.fr> (raw)
In-Reply-To: <trinity-22e4c23f-7ff9-4566-bf14-1b52926112d5-1663618666683@3c-app-gmx-bs15>
Hello,
Le 19/09/2022 à 22:17, Harald Anlauf via Fortran a écrit :
> Dear all,
>
> the following patch was submitted by Jose but never reviewed:
>
> https://gcc.gnu.org/pipermail/fortran/2021-April/055946.html
>
> Before, we didn't set function attributes properly when
> passing polymorphic pointers, which could lead to
> mis-optimization.
>
> The patch is technically fine and regtests ok, although it
> can be shortened slightly, which makes it more readable,
> see attached.
>
> When testing the suggested testcase I found that it was
> accepted (and working fine) with NAG, but it was rejected
> by both Intel and Cray. This troubled me, but I think
> it is standard conforming (F2018:15.5.2.7), while the
> error messages issued by Intel
>
> PR100132.f90(61): error #8300: If a dummy argument is allocatable or a pointer, and the dummy or its associated actual argument is polymorphic, both dummy and actual must be polymorphic with the same declared type or both must be unlimited polymorphic. [S]
> call set(s)
> -------------^
>
> and a similar one by Cray, suggest that they refer to
> F2018:15.5.2.5, which IMHO does not apply here.
> (The text in the error message seems very related to
> the reasoning in Note 1 of that subsection).
>
> I'd like to hear (read: read) a second opinion on that.
>
I think you are correct.
If the dummy wasn't INTENT(IN) the actual argument would have to be a
pointer, and then 15.5.2.5 would apply, but it's not the case here.
With INTENT(IN) the reasons for the constraints from Note 1 don't apply.
I think you can go ahead.
prev parent reply other threads:[~2022-09-20 9:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-19 20:17 Harald Anlauf
2022-09-20 9:28 ` Mikael Morin [this message]
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=87c697b6-bc0a-0424-473d-9b64ecade073@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).