From patchwork Thu Dec 5 21:30:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 297399 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B60772C009A for ; Fri, 6 Dec 2013 08:31:04 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=ZoD009jRmxqNyMZr StK6TSInGIRto86d03KSCteswgUUA5+KqwoygWv3BNscjLR3TTOoDnAowiUFUR96 y0nHKT8ILoqjc4/MXlV6dhl0CjMPXKOQzAHHq88Z+hIdp5TVQJ6wes84GDt7lnCt xVl6Owmx4yv2OOc4rj7jJjuecPs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=4POVy1WPJVmSlTTVQJVw5B C8fCc=; b=NYkIEzzEmxLQJU/CQvSmsf+mFGaWQV0CQ95b4Ck2HsJRrS7kA1jMr8 l/OdTk8xyEfJgkiOGVniF1doliRiQrfSxriBE6kDwsXJS2Kvv0EhP42HeY99TbYP Ifwc63Ubk6I3Z6Ccah+LDwVyCI+/6sysIbh8NSJ/oCrgbwjuG9TFw= Received: (qmail 10439 invoked by alias); 5 Dec 2013 21:30:57 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 10421 invoked by uid 89); 5 Dec 2013 21:30:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: smtp-relay.CeBiTec.Uni-Bielefeld.DE Received: from Unknown (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Dec 2013 21:30:55 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 89DBCB23; Thu, 5 Dec 2013 22:30:46 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GR6Fe8aCVU0Z; Thu, 5 Dec 2013 22:30:44 +0100 (CET) Received: from fuego.CeBiTec.Uni-Bielefeld.DE (p579F6079.dip0.t-ipconnect.de [87.159.96.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 2B427B21; Thu, 5 Dec 2013 22:30:44 +0100 (CET) From: Rainer Orth To: Uros Bizjak Cc: "gcc-patches\@gcc.gnu.org" , Fortran List Subject: Re: [PATCH, libgfortran]: Fix PR59313, gfortran.dg/erf_3.F90 FAILs References: Date: Thu, 05 Dec 2013 22:30:25 +0100 In-Reply-To: (Uros Bizjak's message of "Sun, 1 Dec 2013 20:28:53 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Uros Bizjak writes: > Currently, gfortran.dg/erf_3.F90 FAILs on targets with 128bit > (quadruple) long double, since high-precision erfc_scaled_r16 gets > defined only for __float128 quadruple precision. > > Attached patch defines this function also for 128bit long double targets. > > [BTW: The patch really implements what FX's ChangeLog says: > > * intrinsics/erfc_scaled_inc.c: Do not provide quadruple > precision variant.] > > 2013-12-01 Uros Bizjak > > PR libfortran/59313 > * intrinsics/erfc_scaled.c (erfc_scaled_r16): Also provide for > quadruple precision long double variant. > > Tested on x86_64-pc-linux-gnu and alphaev68-pc-linux-gnu. > > OK for mainline? Unfortunately, this breaks Solaris/SPARC bootstrap: /vol/gcc/src/hg/trunk/local/libgfortran/intrinsics/erfc_scaled.c: In function 'erfc_scaled_r16': /vol/gcc/src/hg/trunk/local/libgfortran/intrinsics/erfc_scaled.c:64:22: error: 'M_2_SQRTPIl' undeclared (first use in this function) # define _M_2_SQRTPI M_2_SQRTPIl ^ /vol/gcc/src/hg/trunk/local/libgfortran/intrinsics/erfc_scaled.c:117:31: note: in expansion of macro '_M_2_SQRTPI' return (1 + sum) / x * (_M_2_SQRTPI / 2); ^ /vol/gcc/src/hg/trunk/local/libgfortran/intrinsics/erfc_scaled.c:64:22: note: each undeclared identifier is reported only once for each function it appears in # define _M_2_SQRTPI M_2_SQRTPIl ^ /vol/gcc/src/hg/trunk/local/libgfortran/intrinsics/erfc_scaled.c:117:31: note: in expansion of macro '_M_2_SQRTPI' return (1 + sum) / x * (_M_2_SQRTPI / 2); ^ /vol/gcc/src/hg/trunk/local/libgfortran/intrinsics/erfc_scaled.c:119:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ make[3]: *** [erfc_scaled.lo] Error 1 It seems M_2_SQRTPI[lq] are GNU extensions, thus missing in Solaris . The following patch at least allows Solaris bootstrap to continue: I suppose the same should be done for M_2_SQRTPIq? Rainer diff --git a/libgfortran/intrinsics/erfc_scaled.c b/libgfortran/intrinsics/erfc_scaled.c --- a/libgfortran/intrinsics/erfc_scaled.c +++ b/libgfortran/intrinsics/erfc_scaled.c @@ -61,6 +61,9 @@ see the files COPYING3 and COPYING.RUNTI #else # define _THRESH -106.566990228185312813205074546585730L +# ifndef M_2_SQRTPIl +# define M_2_SQRTPIl 1.128379167095512573896158903121545172L +# endif # define _M_2_SQRTPI M_2_SQRTPIl # define _INF __builtin_infl() # ifdef HAVE_ERFCL