From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by sourceware.org (Postfix) with ESMTPS id 4C924385801A; Tue, 22 Jun 2021 07:40:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4C924385801A X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from vepi2 ([79.194.171.234]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MTRMs-1lqDD53m3A-00TjX1; Tue, 22 Jun 2021 09:40:20 +0200 Date: Tue, 22 Jun 2021 09:40:18 +0200 From: Andre Vehreschild To: Tobias Burnus Cc: GCC-Patches-ML , GCC-Fortran-ML , Brad Richardson Subject: Re: [Ping^2, Patch, Fortran] PR100337 Should be able to pass non-present optional arguments to CO_BROADCAST Message-ID: <20210622094018.3ae5a403@vepi2> In-Reply-To: References: <20210521153311.2760b4b3@vepi2> <20210604180518.5daa870d@vepi2> <20210619132332.302f1062@vepi2> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:UDYS35dOj9HhTpPyvITZyE3iURB2PKVwLO+W0c9Tm9ycqkTNlGb HcWHu71KXziuU2t1sk8x2rrfPcUUU3UggahxET/la3oSIMHktV9HUi46amG0Frk8H1hKOom WqqSampFh8luRmZXObH7hmAG0TIeiGvliy7whuP7oLBQxsSQOtDoOWasNCEGRxqyKT18ACR oU2i8uLtZs9rTV4eBz5tw== X-UI-Out-Filterresults: notjunk:1;V03:K0:pHuAmhhglO0=:muTy+qv+amLSyfqPo/Ai2X uTzIKVupIFpT/q68LSRKFgLxQ2ETnelgSD8K355MImbGnrFtQa6GslEeSsSVX4AtNkVcyJXZ6 UMoH74Ev6EPru6dozecOKeszpQ0QKxbFNyS567A/dMhYhbQ6+SHR2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ROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2021 07:40:29 -0000 Hi Tobias, thanks for the review. To the questions:=20 - I added a test only for -fcoarray=3Dsingle because in the library case the optional stat is just propagated to the library, which is already tested a lot of times and which needs to handle the optional stat in any case. So = an error there would have been detected in one of the earlier tests. I did n= ot want to add unnecessary test overhead given that the tests already run f= or a long time. - I did not add tests for the other CO_* routines, i.e. CO_MIN, CO_MAX, CO_REDUCE or CO_SUM, that are also handled by this routine, because I bel= ieve that showing that the fix works for CO_BROADCAST shows that the others wo= rk, too. Because the four others do not have any special handling in their implementation in trans_intrinsic. Or do you mean other coarray-routines besides the five handled by conv_co_collective()? If it is ok for you, I would apply the patch as is, or do you see a reason = to add more tests? Regards, Andre On Mon, 21 Jun 2021 14:30:21 +0200 Tobias Burnus wrote: > Any reason that you did not put it under > gfortran.dg/coarray/ > such that it is also run with -fcoarray=3Dlib (-lcaf_single)? > I know that the issue only exists for single, but it also makes > sense to check that libcaf_single works .... >=20 > In that sense, I wonder whether also the other CO_* should be > checked in the testsuite as they are handled differently in > libcaf_... (but identical with -fcoarray=3Dsingle). >=20 > Except for those two nits, it LGTM. Thanks! >=20 > Tobias >=20 > PS: The function is used by > case GFC_ISYM_CO_BROADCAST: > case GFC_ISYM_CO_MIN: > case GFC_ISYM_CO_MAX: > case GFC_ISYM_CO_REDUCE: > case GFC_ISYM_CO_SUM: > and, with -fcoarray=3Dsingle, errmsg is not touched > as stat is (unconditionally) 0 (success).. >=20 >=20 > On 19.06.21 13:23, Andre Vehreschild via Fortran wrote: > > PING! > > > > On Fri, 4 Jun 2021 18:05:18 +0200 > > Andre Vehreschild wrote: > > =20 > >> Ping! > >> > >> On Fri, 21 May 2021 15:33:11 +0200 > >> Andre Vehreschild wrote: > >> =20 > >>> Hi, > >>> > >>> the attached patch fixes an issue when calling CO_BROADCAST in > >>> -fcoarray=3Dsingle mode, where the optional but non-present (in the c= alling > >>> scope) stat variable was assigned to before checking for it being not > >>> present. > >>> > >>> Regtests fine on x86-64-linux/f33. Ok for trunk? > >>> > >>> Regards, > >>> Andre =20 > >> =20 > > > > -- > > Andre Vehreschild * Email: vehre ad gmx dot de =20 > ----------------- > Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 M=C3=BCnchen > Registergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thoma= s Heurung, Frank > Th=C3=BCrauf --=20 Andre Vehreschild * Email: vehre ad gmx dot de=20