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 >