From: Harald Anlauf <anlauf@gmx.de>
To: Paul Richard Thomas <paul.richard.thomas@gmail.com>,
"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch, fortran] PR98498 - Interp request: defined operators and unlimited polymorphic
Date: Wed, 1 Nov 2023 21:12:43 +0100 [thread overview]
Message-ID: <97147ff1-9d5b-4f0c-8a28-22d454d0476c@gmx.de> (raw)
Message-ID: <20231101201243.o_-jWHcw5pmjLms9wocFpeR5Cdw3Spw7kefT3g4wC7M@z> (raw)
In-Reply-To: <CAGkQGiKDp9UzOyjO0Z4kp+WKD9UXE=rmnndQPMDCWVagwSFu9g@mail.gmail.com>
Hi Paul,
Am 01.11.23 um 19:02 schrieb Paul Richard Thomas:
> The interpretation request came in a long time ago but I only just got
> around to implementing it.
>
> The updated text from the standard is in the comment. Now I am writing
> this, I think that I should perhaps use switch(op)/case rather than using
> if/else if and depending on the order of the gfc_intrinsic_op enum being
> maintained. Thoughts?
the logic is likely harder to parse with if/else than with
switch(op)/case. However, I do not think that the order of
the enum will ever be changed, as the module format relies
on that very order.
> The testcase runs fine with both mainline and nagfor. I think that
> compile-only with counts of star-eq and star_not should suffice.
I found other cases that are rejected even with your patch,
but which are accepted by nagfor. Example:
print *, ('a' == c)
Nagfor prints F at runtime as expected, as it correctly resolves
this to star_eq. Further examples can be easily constructed.
Can you have a look?
Thanks,
Harald
> Regtests with no regressions. OK for mainline?
>
> Paul
>
> Fortran: Defined operators with unlimited polymorphic args [PR98498]
>
> 2023-11-01 Paul Thomas <pault@gcc.gnu.org>
>
> gcc/fortran
> PR fortran/98498
> * interface.cc (upoly_ok): New function.
> (gfc_extend_expr): Use new function to ensure that defined
> operators using unlimited polymorphic formal arguments do not
> override their intrinsic uses.
>
> gcc/testsuite/
> PR fortran/98498
> * gfortran.dg/interface_50.f90: New test.
>
next prev parent reply other threads:[~2023-11-01 20:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 18:02 Paul Richard Thomas
2023-11-01 20:12 ` Harald Anlauf [this message]
2023-11-01 20:12 ` Harald Anlauf
2023-11-02 18:18 ` Paul Richard Thomas
2023-11-02 20:35 ` Harald Anlauf
2023-11-02 20:35 ` 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=97147ff1-9d5b-4f0c-8a28-22d454d0476c@gmx.de \
--to=anlauf@gmx.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=paul.richard.thomas@gmail.com \
/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).