From: Mikael Morin <morin-mikael@orange.fr>
To: Harald Anlauf <anlauf@gmx.de>, Mikael Morin <mikael@gcc.gnu.org>,
fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 0/3] fortran: fix length one character dummy args [PR110419]
Date: Mon, 14 Aug 2023 21:47:03 +0200 [thread overview]
Message-ID: <251e4296-b1fd-48e7-84da-126dd47815e0@orange.fr> (raw)
In-Reply-To: <69ae66ca-df06-4169-88cb-96290d28aeac@gmx.de>
Hello,
Le 13/08/2023 à 23:16, Harald Anlauf via Fortran a écrit :
> Hi Mikael,
>
> Am 09.08.23 um 22:21 schrieb Mikael Morin via Gcc-patches:
>> Hello,
>>
(...)
>>
>> I have regression tested this on x86_64-unknown-linux-gnu, and
>> powerpc64-unknown-linux-gnu (both -m32 and -m64).
>> OK for master?
>
> this looks good to me.
>
> There was only one thing I was uncertain what the right way is:
> you chose to use mpz_cmp_ui in the length check in the new helper
> function gfc_length_one_character_type_p, while in many other places
> the length check uses mpz_cmp_si.
>
> Admittedly, a negative (effective/declared) character length can never
> occur, except maybe at intermediate times during resolution before this
> is fixed up in accordance with the standard. So this is probably more
> a cosmetic decision, and you can decide to use either variant.
>
That's well spotted, but I think it doesn't matter in this case.
There are only two cases: whether the length is 1, and whether the
length is different from 1. In each of those two cases, gfc_cmp_si and
gfc_cmp_ui return both either zero or non-zero.
I'm afraid of last-minute changes, so I prefer to keep the patch as is.
Thanks for the review.
Mikael
prev parent reply other threads:[~2023-08-14 19:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 20:21 Mikael Morin
2023-08-09 20:21 ` [PATCH 1/3] fortran: New predicate gfc_length_one_character_type_p Mikael Morin
2023-08-09 20:21 ` [PATCH 2/3] fortran: Fix length one character dummy arg type [PR110419] Mikael Morin
2023-08-09 20:21 ` [PATCH 3/3] testsuite: Use distinct explicit error codes in value_9.f90 Mikael Morin
2023-08-13 21:16 ` [PATCH 0/3] fortran: fix length one character dummy args [PR110419] Harald Anlauf
2023-08-14 19:47 ` 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=251e4296-b1fd-48e7-84da-126dd47815e0@orange.fr \
--to=morin-mikael@orange.fr \
--cc=anlauf@gmx.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=mikael@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).