From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id A28EE385AC32 for ; Tue, 11 Jan 2022 22:01:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A28EE385AC32 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1n7PCT-0000G9-Nd for fortran@gcc.gnu.org; Tue, 11 Jan 2022 23:01:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: fortran@gcc.gnu.org From: Harald Anlauf Subject: Re: [PATCH] Fortran: make IEEE_CLASS recognize signaling NaNs Date: Tue, 11 Jan 2022 23:01:01 +0100 Message-ID: References: <2F9F946D-C06C-4D3A-AD24-33913F040B3B@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Content-Language: en-US In-Reply-To: <2F9F946D-C06C-4D3A-AD24-33913F040B3B@gmail.com> Cc: gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Tue, 11 Jan 2022 22:01:08 -0000 Message-ID: <20220111220101.UIbZs8Fs4mxvQx-_BxukIyoOR4VzZk2rn3Z3VEMF52M@z> Hi FX, Am 02.01.22 um 11:50 schrieb FX via Fortran: > Hi, > > This is the first part of a three-patch series to fix PR 82207 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82207), making gfortran handle signaling NaNs. This part fixes the library code implementing IEEE_CLASS, by using the issignaling macro (from TS 18661-1:2014) to check whether a NaN is signalling. > > The patch comes with a testcase, conditional on issignaling support (which will therefore run on glibc targets), which uses C built-ins to generate signaling NaNs and checks in Fortran code that they are classified and behave as expected. > > Once this is in, the next two parts are: > > - Add support for generating signaling NaNs in IEEE_VALUE, which is a longer patch because it requires moving the IEEE_VALUE library code from Fortran to C (but will be much more efficient and correct than the current implementation). > - Provide a fallback implementation of issignaling on targets that don’t have it. > > > Bootstrapped and regtested on x86_64-pc-gnu-linux. OK to commit? > > FX > I think this patch breaks the testsuite, since the directive ! { dg-additional-sources signaling_1_c.c } should rather read ! { dg-additional-sources "signaling_1_c.c" } At least this is similar what I see in other testcases. Harald