From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51263 invoked by alias); 4 Mar 2019 13:39:57 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 50918 invoked by uid 89); 4 Mar 2019 13:39:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy=Latest, outstanding, exponent, Aborted X-HELO: EUR04-HE1-obe.outbound.protection.outlook.com Received: from mail-eopbgr70055.outbound.protection.outlook.com (HELO EUR04-HE1-obe.outbound.protection.outlook.com) (40.107.7.55) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Mar 2019 13:39:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oSX9jOS9SmcOlD5FTzrIeauEax0APBHTD4+V3N4cls0=; b=kudSxvle/XDqCAzrGhvvJB2fhUECBVbatXyXnfVq+zKozXuAwzepSo0m1IQiS7VK0zgVRCCz53JyfLvKDKjD7XwomFkyq0U9AwQrwpCQjabv9CbX72SmIFJth+hqhNiSxXHmXOcTTwcOpk+PB3zGOHo2Dr1wpAlnzMMmb9EP1iY= Received: from DB5PR08MB1030.eurprd08.prod.outlook.com (10.166.14.15) by DB5PR08MB0870.eurprd08.prod.outlook.com (10.164.43.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.15; Mon, 4 Mar 2019 13:39:52 +0000 Received: from DB5PR08MB1030.eurprd08.prod.outlook.com ([fe80::c488:f38f:60cf:ea96]) by DB5PR08MB1030.eurprd08.prod.outlook.com ([fe80::c488:f38f:60cf:ea96%4]) with mapi id 15.20.1665.019; Mon, 4 Mar 2019 13:39:52 +0000 From: Wilco Dijkstra To: Richard Biener , "giuliano.belinassi@usp.br" CC: GCC Patches , nd Subject: Re: [PATCH] Fix PR89437 Date: Mon, 04 Mar 2019 13:39:00 -0000 Message-ID: References: <82582A0A-F1A4-43A8-89C0-30362BA87785@gmail.com> , In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-SW-Source: 2019-03/txt/msg00112.txt.bz2 Hi Richard, =A0=20 >On Thu, Feb 21, 2019 at 6:09 PM Wilco Dijkstra wr= ote: >> >> Hi Richard, >> >> >>Fix an issue with sinl (atanl (sqrtl (LDBL_MAX)) returning 0.0 >> >>instead of 1.0 by using x < sqrtl (LDBL_MAX) in match.pd. >> > >> > Wasn't that a intermediate problem with the mpfr exponent range limiti= ng? >> > Please check whether that's still needed. >> >> I tested it with trunk about an hour ago, and it included Jacub's patch. >> Are there other fixes outstanding which haven't been committed yet? > > Not that I know of.=A0 Did we root-cause the bogus folding to 0.0?=A0 Bec= ause > I don't really understand why using < can "fix" this... Yes, the underlying issue is that build_sinatan_real returns the first valu= e that does overflow when squared. Maybe that wasn't intended, but using less-than on t= he first value that does overflow works. With my patch (now committed) the test pass= es in all rounding modes. Like I mentioned, in the future this check could use a much smaller value b= ased on the size of the mantissa - that's safer since you're not close to infinity. > Latest trunk also still gives an assertion failure in mpc with the gcc.dg= /torture/builtin-math-5.c > which started at the same time as the other mpc/mpfr releated issues: > > build/src/mpc/src/pow.c:631: MPC assertion failed: z_imag || mpfr_number_= p (MPC_RE(u)) > build/src/gcc/gcc/testsuite/gcc.dg/torture/builtin-math-5.c:95:3: interna= l compiler error: Aborted > 0x6725ab crash_signal > build/src/gcc/gcc/toplev.c:326 > > Ick.=A0 Is there a PR about this? This happens when using an old mpc (0.8.2). It's valid according to the con= figure check, however it works with the 1.0.3 version that download-prerequisites uses. M= aybe we should increase the minimum mpc version in configure? Wilco