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