public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mikael Morin <morin-mikael@orange.fr>
To: Harald Anlauf <anlauf@gmx.de>, fortran <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fortran: check types of operands of arithmetic binary operations [PR107217]
Date: Wed, 12 Oct 2022 13:05:47 +0200	[thread overview]
Message-ID: <93c0f66e-1eeb-3e3d-8345-48c17784e030@orange.fr> (raw)
In-Reply-To: <trinity-820c5571-4877-4f7c-bb95-3c9a5487d6a6-1665519780978@3c-app-gmx-bs49>

Le 11/10/2022 à 22:23, Harald Anlauf via Fortran a écrit :
> Dear all,
> 
> we need to check that the operands of arithmetic binary operations
> are consistent and of numeric type.
> 
> The PR reported an issue for multiplication ("*"), but we better
> extend this to the other binary operations.
> 
> I chose the following solution:
> - consistent types for +,-,*,/, keeping an internal error if any
>    unhandled type shows up,

I thought it was insufficient for cases where types are consistent but 
invalid, for example:
    print *, [real :: ([.true.])] / [real :: ([.false.])]
but this case is properly caught, and a few other as well, so no problem.

> - numeric types for **
> 
> Regtested on x86_64-pc-linux-gnu.  OK for mainline?
> 
Yes, thanks.

      reply	other threads:[~2022-10-12 11:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 20:23 Harald Anlauf
2022-10-12 11:05 ` Mikael Morin [this message]

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=93c0f66e-1eeb-3e3d-8345-48c17784e030@orange.fr \
    --to=morin-mikael@orange.fr \
    --cc=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /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).