From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by sourceware.org (Postfix) with ESMTPS id B14F73858D33; Fri, 5 May 2023 19:36:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B14F73858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1683315378; i=anlauf@gmx.de; bh=XONOA8Rs3c6MMAvYajBpx91l5uYbqezUIh2hgOt5RtM=; h=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To; b=dtW6rYyFJjz7QvljKb6GTuLO4Z7NATA8Lmv5ULdbVkBmM0WMo5HQLVIHHy5HfJTXj ivbPL4A1R+dDWZtKx/cOqL2W6+Wzqnc35ILSfPPdIk0zBX0Udtz+Tpyubl1UfiX5/1 C5HbHd1EE1rqgROz3ImaoXjjDv3FghPHSYMEjFMMQXomoogSZzwcioy3lTD9L/KSlW OQGpOzdegsbKSs5YSsrZfo0MS6Kxs7vXqzmEG7o5Kdp1z9DXOUW+VLDNiymeBmcMeL EA6Yf/Lv3w0u9YCCJfTPdro5g/+T79WCnbnv0PcZB1EoaAWfwXfGT6CYHssGs+7mCy duiUqt4JVIZQA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.178.29] ([93.207.81.182]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MCbEp-1q47tZ2sp1-009dk9; Fri, 05 May 2023 21:36:18 +0200 Message-ID: <881c4c80-3b5c-9ac7-1119-6ebd377c9d47@gmx.de> Date: Fri, 5 May 2023 21:36:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH] Fortran: overloading of intrinsic binary operators [PR109641] To: Mikael Morin , fortran , gcc-patches Newsgroups: gmane.comp.gcc.patches,gmane.comp.gcc.fortran References: <618d5f73-55f9-d9d2-e470-aabb5dd7ab17@orange.fr> Content-Language: en-US From: Harald Anlauf In-Reply-To: <618d5f73-55f9-d9d2-e470-aabb5dd7ab17@orange.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:NJlrrGImDkYdwnJsbcrVuZpxfIk4NPLV3Zu0+JOjjTtOasUlUYR 3eAEPm23x7k6Vl27M7ijdNRvakyYW67q3wsTzhxaGiBi2JvcjGTVqplT0IkTfKBTeZbolIV aGLu/aJBCGgppD/WW8VkF+jBOe8IY2xKycvIbawlZoQn1P7gfdKYmtQL82QfCPVoVA5VeDQ reIFn8s9NryKL5tPO/+kA== UI-OutboundReport: notjunk:1;M01:P0:2EG2jxYlkic=;6mGpG+FkhdHSTSwq/AhCg3Kem/K USAk7rfvGYIpP3qpSzMEBuj5TQkxCbH8ZCuc335+uUlLsusmQFZTuv3OHPvTkiIuxDiqWqwem 6OMZSfG9ASHB6KcHnyxC4//jAbU0cgbgqBp+gPFK1rqpfZDh1xFjaCAsbPr+DSpVRM85cGfOk Z3pisn/Mjd6xe67a62YDHVROzAzl+7uLn4kri+u5L550blvoqC+/P7cU6bCtfxTq8WogxBgzK HiZeD3R2nG7YyZJkLoTBhrHXl8MTRRIveXjW9DGBysmCPxtMnN6/E3vYfuNJ3yO1lmHvFIFDb pOm7XKoTVDrg1+DSFy28GV7m453s/e8TvpR1Jqhc9r2wy5iVZ4P07JLQKkuZcPLUMbuQhfu07 PB6tAQ7nyY/SPd9/M5P7eip26RcblQYHbBMz4De4Vk2ae88gvSOaZL6wlF7jj3oJpWLddWh6g uQ6BA/xR6zP/UrRFJY2xUcTBl533nhFvZV6DXE8xJ2NbcQXEH0iMO5CxHmR4XnW0QDS8lXsZI hKBE1jShDMZk5mpGDW8EQTBjGyof7WFDP5bwJtBHTo700W1iPZgLsnQnqg7WGksDJT0PCrRxB zaJdNFnm16bJzEATLu3jZgy+E2LYYHflE+Wtnrpm4UXliH16GBFkY5nIYCByj9NdleAhQ7DMy OIP9Eobi6ONrWwer50jPK6OGj0XSGBiKkEuZc3bRRHU3CvKVhwhG1a9OF8wDY3WlZVsFCT1ap KNBhUVqPtDaQFncEnfu0wOUFOA2wQMLvuXcO1469T5NjaSPi02K+LWb1R8BlYyqMKZZPLbgFo I5yUq2ksDZxNIfz1AM5scq/IK7eJjb4+uaEoFft0+XJqi5E8vtO32fX3O2WRo7jSjObBTCpam piN3Ns7cg+q2xmrWtSHRB+heaXRROkTuS+MnmOIwPs7eh8IFS+cfwNdCkBtn9u5Moltrqv3pW cmmZngItoqwhdq4xVwQMJuVMvZQ= X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Mikael, On 5/5/23 13:43, Mikael Morin wrote: > Hello, > > Le 01/05/2023 =C3=A0 18:29, Harald Anlauf via Fortran a =C3=A9crit=C2=A0= : >> +/* Given two expressions, check that their rank is conformable, i.e. >> either >> +=C2=A0=C2=A0 both have the same rank or at least one is a scalar.=C2= =A0 */ >> + >> +bool >> +gfc_op_rank_conformable (gfc_expr *op1, gfc_expr *op2) >> +{ >> +//=C2=A0 if (op1->expr_type =3D=3D EXPR_VARIABLE && op1->ref) > Please remove this, and the other one below. oops, that was a leftover from debugging sessions, which I missed during my final pass. Fixed and pushed as r14-529-g185da7c2014ba41f38dd62cc719873ebf020b076. Thanks for the review! Harald >> +=C2=A0 if (op1->expr_type =3D=3D EXPR_VARIABLE) >> +=C2=A0=C2=A0=C2=A0 gfc_expression_rank (op1); >> +//=C2=A0 if (op2->expr_type =3D=3D EXPR_VARIABLE && op2->ref) >> +=C2=A0 if (op2->expr_type =3D=3D EXPR_VARIABLE) >> +=C2=A0=C2=A0=C2=A0 gfc_expression_rank (op2); >> + >> +=C2=A0 return (op1->rank =3D=3D 0 || op2->rank =3D=3D 0 || op1->rank = =3D=3D op2->rank); >> +} >> + >> + >> =C2=A0static void >> =C2=A0add_caf_get_intrinsic (gfc_expr *e) >> =C2=A0{ > > The rest looks good. > OK for master, and backport as well. > > Thanks > Mikael > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id 232243858422 for ; Fri, 5 May 2023 19:36:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 232243858422 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=m.gmane-mx.org Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pv1E6-0001Yz-4c for gcc-patches@gcc.gnu.org; Fri, 05 May 2023 21:36:22 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gcc-patches@gcc.gnu.org From: Harald Anlauf Subject: Re: [PATCH] Fortran: overloading of intrinsic binary operators [PR109641] Date: Fri, 5 May 2023 21:36:17 +0200 Message-ID: <881c4c80-3b5c-9ac7-1119-6ebd377c9d47@gmx.de> References: <618d5f73-55f9-d9d2-e470-aabb5dd7ab17@orange.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US In-Reply-To: <618d5f73-55f9-d9d2-e470-aabb5dd7ab17@orange.fr> Cc: fortran@gcc.gnu.org X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Message-ID: <20230505193617.qd195gkq6HoJ7-4n5U_786FyvYVbAFEzfAPLT_gcGoo@z> Hi Mikael, On 5/5/23 13:43, Mikael Morin wrote: > Hello, > > Le 01/05/2023 à 18:29, Harald Anlauf via Fortran a écrit : >> +/* Given two expressions, check that their rank is conformable, i.e. >> either >> +   both have the same rank or at least one is a scalar.  */ >> + >> +bool >> +gfc_op_rank_conformable (gfc_expr *op1, gfc_expr *op2) >> +{ >> +//  if (op1->expr_type == EXPR_VARIABLE && op1->ref) > Please remove this, and the other one below. oops, that was a leftover from debugging sessions, which I missed during my final pass. Fixed and pushed as r14-529-g185da7c2014ba41f38dd62cc719873ebf020b076. Thanks for the review! Harald >> +  if (op1->expr_type == EXPR_VARIABLE) >> +    gfc_expression_rank (op1); >> +//  if (op2->expr_type == EXPR_VARIABLE && op2->ref) >> +  if (op2->expr_type == EXPR_VARIABLE) >> +    gfc_expression_rank (op2); >> + >> +  return (op1->rank == 0 || op2->rank == 0 || op1->rank == op2->rank); >> +} >> + >> + >>  static void >>  add_caf_get_intrinsic (gfc_expr *e) >>  { > > The rest looks good. > OK for master, and backport as well. > > Thanks > Mikael >