From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by sourceware.org (Postfix) with ESMTPS id 0073E394D8FE; Thu, 20 May 2021 06:57:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0073E394D8FE X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [79.251.13.38] ([79.251.13.38]) by web-mail.gmx.net (3c-app-gmx-bs52.server.lan [172.19.170.105]) (via HTTP); Thu, 20 May 2021 08:57:06 +0200 MIME-Version: 1.0 Message-ID: From: Harald Anlauf To: Tobias Burnus Cc: gcc-patches , fortran , David Edelsohn , Segher Boessenkool Subject: Aw: [Patch] Testsuite/Fortran: gfortran.dg/pr96711.f90 - fix expected value for PowerPC [PR96983] Content-Type: text/plain; charset=UTF-8 Date: Thu, 20 May 2021 08:57:06 +0200 Importance: normal Sensitivity: Normal In-Reply-To: References: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:e4JMOM4KIano5pIiM5YCCZWqe9WrhEJ8euR4k+sYXjaPHBB31HvaEXngTFZJ8zGkTrFab MOui24JHomjA/VheWR61nSFpPyZnAcWxqDDuVSkyD7xBLhkP7DPu8quqqHho/Qj+HbnU4hTAKmvM NxfQE2tLln4jXy4OMGmhMtxGr1WtZez9qmmekZw33j7CtLo4mqVlYuJSqTqIjFhYbpkOAvTauEvI 5UWgB79pzXXS76y6g61LlCPO7ucr4gCFOc5OkrqmWTIm8OwiGqz7TbQPtsO7dgGnULxVsnl5IwPe 18= X-UI-Out-Filterresults: notjunk:1;V03:K0:qGSBHDHzJlM=:ImfXzN1K32uL3FtpA6UC1h oCqsVMox/qU5ZkEEzWogo5TROqx37ryufN7+iMcSNm/uvAji1TpxjJc+GW++O2fKxAbACInyz tblo1+eoRmMsYI9VydXpe7hVeGdDlosxSA4slQpDFWGnbZVFj1k+rSI+/mu2GtUK7qGYFBvT5 9o/XwkduAEAgbBW/EZ0MF7a8fN+YvFjCQsvFRhRJ624DVNzJ0266+pkbsmvY83E/eryncOeqB kA7AtEyPvFLVnGsZ333/WVr/R6WKVIR1Cd0Py+P7MKfPdSsj6+g7PVe8Kja2TPL6pNIjQMVVQ allIVj5xk61GiF4Fjlk38KQt7ixpyzRvGZQS4A20BKoDrj9bTpNd6D4ppkyQ99zaSHDdVE/oD 1EwoD53n7ZfAKo3BW10v6DXLxDKIBetys7qq+5wRUc4gUQT+/NqbaJwdYykWpHl6c0gIaMbGV CpIipL7ZUrVrpjsBDDnjFxVz8r/HZNX1Bny4ugJ9+Lzzb7yjJmMOeJcRm9Ghs8E4790tm/KLc 25tDCS6j0jeIoKEa8YQn8Xus+FNsTjPWk9njHN5TQXTU6OWxDwacJOpzHsj5vh4Ya7MXIc0S+ qK0Q6mPQKr40HAXKt4B7Qo3I8gBfnD1FU9Dpg4o9si5KYU8BaHwBqrlqp/yJ/3aCn4Hcn+1hS WJKWXhZGpsKCpmH4xNjLNIoFgJUpFMtIZhkvdYP67wSowQmRu2rtejJ1mKY425PIiAOW3efaK BxDPyuCJPvKMzTDOLhbvmCJV2Sat1Hqbb0fTgqcfVHCywQ9waQRPJ33MDgavrib9k5mp2K6iH A+kpeg3jk2OyaA8Fb/C0BWXYMf/vQ== X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2021 06:57:16 -0000 Hi Tobias, > @All, Harald: Does the attached patch make sense? first of all: sorry for the really badly designed testcase. The best solution has already been discussed in this thread, which is to replace integer(16), parameter :: m1 = 9007199254740992_16 !2**53 integer(16), parameter :: m2 = 10384593717069655257060992658440192_16 !2**113 by integer(16), parameter :: m1 = 2_16 ** digits (x) ! IEEE: 2**53 integer(16), parameter :: m2 = 2_16 ** digits (y) ! IEEE: 2**113 The motivation was to test that compile-time and run-time produce the same correct result, as well as verifying that the user gets what he/she would naively expect from the intrinsic. There should be no hidden double conversion that might e.g. truncate. I decided for the largest real values which are exactly representable also as integer, and for which the rounding operation should always reproduce the expected result. E.g. nint (x) - nint (x-1) should give 1, while nint (x) - nint (x+1) might give 0, which happens for the chosen values on x86. I had this in my mind, but decided to drop this because I had no idea if there are exotic, non-IEEE, or other implementations which would fail on this. Thanks for fixing this! Harald