public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: Mikael Morin <morin-mikael@orange.fr>,
	fortran <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fortran: overloading of intrinsic binary operators [PR109641]
Date: Fri, 5 May 2023 21:36:17 +0200	[thread overview]
Message-ID: <881c4c80-3b5c-9ac7-1119-6ebd377c9d47@gmx.de> (raw)
In-Reply-To: <618d5f73-55f9-d9d2-e470-aabb5dd7ab17@orange.fr>

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
>


WARNING: multiple messages have this Message-ID
From: Harald Anlauf <anlauf@gmx.de>
To: gcc-patches@gcc.gnu.org
Cc: fortran@gcc.gnu.org
Subject: Re: [PATCH] Fortran: overloading of intrinsic binary operators [PR109641]
Date: Fri, 5 May 2023 21:36:17 +0200	[thread overview]
Message-ID: <881c4c80-3b5c-9ac7-1119-6ebd377c9d47@gmx.de> (raw)
Message-ID: <20230505193617.qd195gkq6HoJ7-4n5U_786FyvYVbAFEzfAPLT_gcGoo@z> (raw)
In-Reply-To: <618d5f73-55f9-d9d2-e470-aabb5dd7ab17@orange.fr>

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
> 



  reply	other threads:[~2023-05-05 19:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-01 16:29 Harald Anlauf
2023-05-05 11:43 ` Mikael Morin
2023-05-05 19:36   ` Harald Anlauf [this message]
2023-05-05 19:36     ` Harald Anlauf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=881c4c80-3b5c-9ac7-1119-6ebd377c9d47@gmx.de \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=morin-mikael@orange.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).