From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cc-smtpout3.netcologne.de (cc-smtpout3.netcologne.de [IPv6:2001:4dd0:100:1062:25:2:0:3]) by sourceware.org (Postfix) with ESMTPS id 146BA3858C2F; Thu, 8 Jun 2023 18:17:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 146BA3858C2F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=netcologne.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=netcologne.de Received: from cc-smtpin2.netcologne.de (cc-smtpin2.netcologne.de [89.1.8.202]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id AA1771234C; Thu, 8 Jun 2023 20:17:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=netcologne.de; s=nc1116a; t=1686248273; bh=prKdzaw9PJsN5trofm2mKeh6vgm+XF9nNMn1hAml3ts=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:From; b=fodY3aejBFm7nl+pknO3iMwsuo24b61zr7PM2U/dxWIXq5rw4KlYNDSjsRglk/pbQ 3mwO8VFOIpNVYRHz6t0wP4Oc2cjCRS/1V2rlP7HhUoN91eM7t+cuH/cDiv4Ym/o+X+ J7SqJXEdS9q4a7NKg52jPuInpJZZkFpK/vq31myewKNaxYQHccZr+uPT4RtXxetIlB t6HsPcqshI4g6fPS4YUKABTNSpEoadR+dgX5Kblgju+HKOlJ5V2MtcYPwHlL+cQ7Cc y2lB8Atm4ACnXbweJFn4buj1nFuwMCAeUKmpFx0YoAGWkvz15gk7RjqIKga/7tGl0t 4qalTq8z3fJsA== Received: from [IPV6:2001:4dd7:2d6e:0:7285:c2ff:fe6c:992d] (2001-4dd7-2d6e-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de [IPv6:2001:4dd7:2d6e:0:7285:c2ff:fe6c:992d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by cc-smtpin2.netcologne.de (Postfix) with ESMTPSA id 2CE9211DA8; Thu, 8 Jun 2023 20:17:48 +0200 (CEST) Message-ID: Date: Thu, 8 Jun 2023 20:17:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] Fortran: add Fortran 2018 IEEE_{MIN,MAX} functions Content-Language: en-US To: sgk@troutmask.apl.washington.edu Cc: Harald Anlauf via Fortran , FX Coudert , gcc-patches@gcc.gnu.org, Michael Meissner References: <34D02A51-4240-4816-B874-54D7CFFE9FC6@gmail.com> <2d99383a-b114-db00-8083-33894492252f@gmx.de> From: Thomas Koenig In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-NetCologne-Spam: L X-Rspamd-Action: no action X-Rspamd-Queue-Id: 2CE9211DA8 X-Spamd-Bar: ---- X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,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, > On Thu, Jun 08, 2023 at 12:17:02PM +0200, Thomas Koenig wrote: [...] > Thanks for the explanation. As I likely will not use a POWER-based > system, I only loosely followed the discussion. I don't remember > if ibm double-double is REAL(16) or REAL(17). If ieee 128-bit is > REAL(16), then everything should (I believe) be okay. From a user standpoint, REAL(16) is always used. We only use the 17 as a marker in the library, and to be able to have library versions of IBM long double co-reside with IEEE long double. >> There is a virutal POWER machine at OSUL dedicated to the IEEE QP >> gfortran effort. It hasn't been used for some time, but it's still >> active. I just bootstrapped trunk there and ran all the IEEE from the >> testsuite manually, with >> >> $ for a in *.f90; do echo "Testing $a"; gfortran -o $a.exe -fno-range-check >> -mcpu=power9 -mabi=ieeelongdouble -static-libgfortran $a signaling_1_c.c >> signaling_2_c.c ; ./$a.exe ; done 2>&1 | grep -v command-line >> Testing fma_1.f90 > > These could be misleading. gfortran has pre-processor tokens > for REAL(10) and REAL(16). If __GFC_REAL_16__ isn't defined > the ieee testing is skipped. Hmm... need to check. With the recently-built compiler: $ cat tst.F90 program memain #if __GFC_REAL_16__ print *,"__GFC_REAL_16 found" #endif #if __GFC_REAL_17__ print *,"__GFC_REAL_17 found" #endif print *,"digits is ",digits(1._16) end program memain $ gfortran -static-libgfortran tst.F90 && ./a.out __GFC_REAL_16 found digits is 106 $ gfortran -static-libgfortran -mabi=ieeelongdouble -mcpu=power9 tst.F90 && ./a.out __GFC_REAL_16 found digits is 113 Looks clean. [...] > Should we have a __GFC_REAL_17__? I don't think we need it - REAL(KIND=17) is not supported in the compiler (we discussed and rejected that), and people who mix IBM long double and IEEE long double will have no joy with their programs; they need to recompile everything. But we may have to do something about the files in the thelibgfortran/ieee subdirectory. Best regards Thomas