From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp-20.smtpout.orange.fr [80.12.242.20]) by sourceware.org (Postfix) with ESMTPS id 0F512385841F for ; Mon, 14 Aug 2023 19:47:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F512385841F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orange.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=orange.fr Received: from [192.168.1.15] ([86.215.161.51]) by smtp.orange.fr with ESMTPA id VdWpqwmbYQTQNVdWyqc27M; Mon, 14 Aug 2023 21:47:13 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1692042433; bh=iFgmE5AIBBxJn0HML1dqUDeU8Zisd+FcSZELDLoxdLM=; h=Date:Subject:To:References:From:In-Reply-To; b=Pez2+DC4VaKsL6H+n+Kh7fkUy9CLJ2ikXJk7GCHtL0mrQhOqFIgalZ/tN35+O6CeF Qpxgz5l5XIUsq72206JqdU8nHiTpgFmZgVwpx/LoMIM8+JYoCQ7+am2T4qjPaw8Dt1 ESr2uaef/skrsN+cZFiAOMQ+UOdthDxvVdvEbiEZ/OSqBXjc/MoGRQBWSid6+jrjao xuwUtT6D0c/CdLh6MEnQrDuIqznoCtV/MBAtAqOxuca/AvJv0DKPdpPEdtYETN4Skb onuc6YhRCC4Gis0/cqobpc20Dz3z436DI8JlObypSM52QUcnsMAZ3AP3QfDoE50LFj GI9GnpVdfb+KQ== X-ME-Helo: [192.168.1.15] X-ME-Auth: bW9yaW4tbWlrYWVsQG9yYW5nZS5mcg== X-ME-Date: Mon, 14 Aug 2023 21:47:13 +0200 X-ME-IP: 86.215.161.51 Message-ID: <251e4296-b1fd-48e7-84da-126dd47815e0@orange.fr> Date: Mon, 14 Aug 2023 21:47:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/3] fortran: fix length one character dummy args [PR110419] To: Harald Anlauf , Mikael Morin , fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org References: <20230809202122.695376-1-mikael@gcc.gnu.org> <69ae66ca-df06-4169-88cb-96290d28aeac@gmx.de> Content-Language: fr From: Mikael Morin In-Reply-To: <69ae66ca-df06-4169-88cb-96290d28aeac@gmx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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