From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id 3BD293858D38; Tue, 6 Jun 2023 19:35:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3BD293858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3f7373b5499so5806505e9.1; Tue, 06 Jun 2023 12:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686080137; x=1688672137; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ndKyTEEIvWZlziQGfXCXxyxpVsuYJwF4LwY7smsU7Kc=; b=BDKL4oxE4p9wUJAw7p2jwAiCj7txzV5ngLb0RhGgaQYc3I4hxMWSckFtFg1XiHx9EX aINSI5rl0LLNLYeA5zX/JQznvKwigOQnzm4eM5sxxXcole5GdY5tra8Cxvr6pBFV26AH MCCmRksXRdymCEQtOzwzPd0QZFa33/ra7XviLLwZA2+UBWc8jI3IvJ4xiUDg6HB37pl0 E0UmGkDlGHRtkSoYAj8JeKVVck75glXsebLsMScfOZ3rDBLyywY4mH0HfvmHiumIzI19 qC5sMIywzL+wlWlBBCotvx2Crv4Ju1LK1Q7un+xner1PFAFVlVPxgWKEaUXSysdyHNfj IEMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686080137; x=1688672137; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ndKyTEEIvWZlziQGfXCXxyxpVsuYJwF4LwY7smsU7Kc=; b=T29EnAOWDhwU27ugPUBVL2udEHi0bMKnzqvMrvgN/YErL7JEesIAjClNac74WNyyP5 SR/8jR1e1hneC0L3xgid8Ska66fEVHQJ12rSrFSAcwJwhyc2DcIawJ/oVr0Z54R5DPY9 9uABAeJj4lbHmxmL2o0ziVjU8aSDAS6OyJyfaRs77ls1NI2kijhPWfof45d7QK0Ws8jv xRKZrJ2nvQh9DBmtCIBbm84HGO8lgoahyOsphBw2kqqT165siZU91OOMGOfC97XSG8g+ Pf31IxrwkfOMleu3yOzD8ge2p2kwNPcAuwejHw1OlxMpGROUgMsiaNEGSMC6X95JphpE s6dw== X-Gm-Message-State: AC+VfDycBFGZd5McS6aywaOa1iWPbEtSehx6attMa9VMkrs/rsF3063h 6hrnLGG4+PzYE3YWz1TBo3KbiutBX4dLlA== X-Google-Smtp-Source: ACHHUZ6MoISEqlt3kQ98Ak99iPqQgRrUavDze3WBR3ztdX6dRBGn/q1Wx7EPVDTH/KyAnN6oL4H0mg== X-Received: by 2002:a05:600c:8610:b0:3f6:c88:c318 with SMTP id ha16-20020a05600c861000b003f60c88c318mr3871599wmb.4.1686080136757; Tue, 06 Jun 2023 12:35:36 -0700 (PDT) Received: from smtpclient.apple ([2a01:e34:ec56:2a80:45fb:d04e:c5d3:cd4c]) by smtp.gmail.com with ESMTPSA id o10-20020a1c750a000000b003f60101074dsm18607112wmc.33.2023.06.06.12.35.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2023 12:35:36 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: [PATCH] Fortran: add Fortran 2018 IEEE_{MIN,MAX} functions From: FX Coudert In-Reply-To: <34D02A51-4240-4816-B874-54D7CFFE9FC6@gmail.com> Date: Tue, 6 Jun 2023 21:35:26 +0200 Cc: gcc-patches@gcc.gnu.org, sgk@troutmask.apl.washington.edu Content-Transfer-Encoding: quoted-printable Message-Id: References: <34D02A51-4240-4816-B874-54D7CFFE9FC6@gmail.com> To: fortran@gcc.gnu.org X-Mailer: Apple Mail (2.3731.600.7) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 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=20 > 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=E2=80=99t 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 >=20 > 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=