public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: FX Coudert <fxcoudert@gmail.com>
To: fortran@gcc.gnu.org
Cc: gcc-patches@gcc.gnu.org, sgk@troutmask.apl.washington.edu
Subject: Re: [PATCH] Fortran: add Fortran 2018 IEEE_{MIN,MAX} functions
Date: Tue, 6 Jun 2023 21:35:26 +0200	[thread overview]
Message-ID: <A4A34FF5-219A-4D26-B381-4309E7020FDF@gmail.com> (raw)
In-Reply-To: <34D02A51-4240-4816-B874-54D7CFFE9FC6@gmail.com>

Hi Steve,

I am not subscribed to the list (too little time, sadly), please keep me in CC of your responses.

> 1. You added fmin, fmax, and friends.  Are these used 
>    internally by gfortran in support of the IEEE_*
>    functions or are these exposed to the user?

The math builtins are added to the front-end, and use for code generation. In conv_intrinsic_ieee_minmax(), you can see we find the right function using things like: builtin_decl_explicit (BUILT_IN_ISSIGNALING)

Those built-ins are not exposed to the user: we don’t need any more GNU-specific intrinsics, methinks.


> 2. I did not see error handling or conversion, but on a
>    quick scan I may have missed it.  What happens with
>    IEEE_MAX_NUM(2.0_4, 3.0_8) or IEEE_MAX_NUM(2.0_4, INT(3))?
>    17.11.17 has
> 
>    X shall be of type real.
>    Y shall be of the same type and kind type parameter as X.


As you saw, the module built as part of libgfortran deals with that. In the longer term, we would need a revamp of those modules to handle everything as intrinsic modules, which would give us more flexibility, but I never found the time to do this migration :(

Best,
FX

  parent reply	other threads:[~2023-06-06 19:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06 13:19 FX
2023-06-06 15:43 ` Steve Kargl
2023-06-06 15:51   ` Steve Kargl
2023-06-06 18:21     ` Steve Kargl
2023-06-06 19:00 ` Harald Anlauf
2023-06-06 19:00   ` Harald Anlauf
2023-06-06 19:11   ` FX Coudert
2023-06-07 18:31     ` Harald Anlauf
2023-06-07 18:31       ` Harald Anlauf
2023-06-07 18:50       ` Steve Kargl
2023-06-08 10:17         ` Thomas Koenig
2023-06-08 10:21           ` FX Coudert
2023-06-08 11:24             ` Thomas Koenig
2023-06-08 16:31           ` Steve Kargl
2023-06-08 18:17             ` Thomas Koenig
2023-06-10 15:24           ` FX Coudert
2023-06-11  9:50             ` Thomas Koenig
2023-06-11 13:43               ` FX Coudert
2023-06-06 19:35 ` FX Coudert [this message]
2023-06-07  3:15   ` Steve Kargl
2023-06-10 15:42     ` FX Coudert

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=A4A34FF5-219A-4D26-B381-4309E7020FDF@gmail.com \
    --to=fxcoudert@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=sgk@troutmask.apl.washington.edu \
    /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).