From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp-18.smtpout.orange.fr [80.12.242.18]) by sourceware.org (Postfix) with ESMTPS id 2E4A73891C31; Wed, 8 May 2024 07:40:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2E4A73891C31 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=orange.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=orange.fr ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2E4A73891C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=80.12.242.18 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715154059; cv=none; b=w1xypmBFpqKJFNxoY824WAIrqaiOy0oKOjfOQG6HfJMeIq+0dKtEdISslgEdlpbs/0spwXxkwhBLOLC7oY2IzBz69ltJFYfFOjYW/TV7jsQUx90E4j3FupudqR5vRHrMOhIOgKKSz8nm13GOLUyiVgQupVLFJtfroh9l1dpb3fw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715154059; c=relaxed/simple; bh=cPR4gCJLI+5sH15KOBk3tMBqdEPIGR2m+81xChN808s=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=uRrUAVNELtKXzZuVyKpab93L4nVOv8BQPjUTimm1RyhF3UP0JA4G3kVDvlvxEAqQS95OgFZSJfWeMG9pogcnA1w9gvgUdz4NP+q2y/0MwAYTJTXOkYJuOVE/qgGLN/GFPg+/7o3Xc07G00dgRPeAuzFlC4+eEwR160Gv3/zGWV0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from [192.168.1.18] ([86.215.161.51]) by smtp.orange.fr with ESMTPA id 4buysF9L80T0d4bv4sGq7j; Wed, 08 May 2024 09:40:55 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1715154055; bh=YjlTz5Tb0FQBhFnbLp5F//n1APBYVyVIJrrppvkeMhE=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=HVZdbtv0P1y9F6pLyZYIA+9sTnqQS5KN0XDUDMZEfzZTmMroKGkNMWe3FX3g/KoFL vOmJgTcBgS1QRIDlKUanFHnvu+GQbJN2f76x/Vix3Sno7RhRoFh77mcPoDnFvOo4fx gWALHpqezM+fr85sLJ1wak5QFzB0nDlgLGiZf3vHtgo+TVQBTphifyaL+3aJ28aTSh IXpZYnuNtu2izeBoEcRPWLof6fQ74vCbowmLF2XQeB6AOkQuJyB30PEfAgxnEBXVJt eeVpzhWDnY8DDTaEnCw8+/7I51qKGISw8APJKpvJHwMbgZUFsnVpnbqVsbutWkoTkn ENdvtj8uP7YNg== X-ME-Helo: [192.168.1.18] X-ME-Auth: bW9yaW4tbWlrYWVsQG9yYW5nZS5mcg== X-ME-Date: Wed, 08 May 2024 09:40:55 +0200 X-ME-IP: 86.215.161.51 Message-ID: <11de6197-4403-4088-a74b-979b926973df@orange.fr> Date: Wed, 8 May 2024 09:40:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/4] fortran: Teach get_real_kind_from_node for Power 128 fp modes [PR112993] To: "Kewen.Lin" , GCC Patches Cc: fortran@gcc.gnu.org, Jakub Jelinek , Segher Boessenkool , Peter Bergner , David Edelsohn References: <813e8433-0428-1854-c82c-fc0743368fa8@linux.ibm.com> Content-Language: fr From: Mikael Morin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP 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: Hello, Le 08/05/2024 à 07:27, Kewen.Lin a écrit : > Hi, > > Previously effective target fortran_real_c_float128 never > passes on Power regardless of the default 128 long double > is ibmlongdouble or ieeelongdouble. It's due to that TF > mode is always used for kind 16 real, which has precision > 127, while the node float128_type_node for c_float128 has > 128 type precision, get_real_kind_from_node can't find a > matching as it only checks gfc_real_kinds[i].mode_precision > and type precision. > > With changing TFmode/IFmode/KFmode to have the same mode > precision 128, now fortran_real_c_float12 can pass with > ieeelongdouble enabled by default and test cases guarded > with it get tested accordingly. But with ibmlongdouble > enabled by default, since TFmode has precision 128 which > is the same as type precision 128 of float128_type_node, > get_real_kind_from_node considers kind for TFmode matches > float128_type_node, but it's wrong as at this time point > TFmode is with ibm extended format. So this patch is to > teach get_real_kind_from_node to check one more field which > can be differentiable from the underlying real format, it > can avoid the unexpected matching when there more than one > modes have the same precision. > > Bootstrapped and regress-tested on: > - powerpc64-linux-gnu P8/P9 (with ibm128 by default) > - powerpc64le-linux-gnu P9/P10 (with ibm128 by default) > - powerpc64le-linux-gnu P9 (with ieee128 by default) > OK from the fortran point of view. Thanks. > BR, > Kewen