From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8AC8F385DC11; Tue, 14 Apr 2020 22:08:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8AC8F385DC11 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586902104; bh=3Ze1Hf48NNaA9mqfh9F0H8NgLenx26v8D9/9GYrhQZ0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=w7by+2LYP/OFXMW3Sbzo09SJl/EZdodK8QN5YbuBWXVXgh7/d/1nV0L+oJm7/jDPK NC6FETDPb1UBlh+dOjFoPxxW2vIl+3NT1A+47A4/Zfdq+SSg9VNtWt6Rm0Gj2m8jri XZ/rLlcB4n4FqLdylvYi6ojQNBckwVcHWlrng8GU= From: "sgk at troutmask dot apl.washington.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' Date: Tue, 14 Apr 2020 22:08:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sgk at troutmask dot apl.washington.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2020 22:08:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94586 --- Comment #9 from Steve Kargl -= -- On Tue, Apr 14, 2020 at 08:48:47PM +0000, dave.anglin at bell dot net wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94586 >=20 > --- Comment #8 from dave.anglin at bell dot net --- > On 2020-04-14 2:12 p.m., sgk at troutmask dot apl.washington.edu wrote: > > #ifdef HAVE_GFC_REAL_16 > > #endif > This one. > > > > Is hppa64 claiming support for a REAL type that it actually > > doesn't support? > Support is a fuzzy word.=C2=A0 There's enough support to build libquadmat= h. So, you have REAL(4), REAL(8), and REAL(16). Is REAL(16) a software implementaton of IEEE 128-bit floating point, which uses libquadmath? If yes, then this suggests the logic to select the suffix 'q' or 'l' needs tweaking as you should be getting, e.g., cosq() from libquadmath instead of cosl(). > > In any event, you can extend the kludge > > > > #if (__STDC_VERSION__ < 199901L) > > #define fmaf(a,b,c) ((a)*(b)+(c)) > > #define fma(a,b,c) ((a)*(b)+(c)) > > #define fmal(a,b,c) ((a)*(b)+(c)) > > #define cosl(a) cos((double)(a)) > > #define sinl(a) sin((double)(a)) > > #define tanl(a) tan((double)(a)) > > #define fabsl(a) ((a) < 0 ? -(a) : (a)) > > #define copysignl(a,b) (fabsl(a)*((b)/fabsl(b))) > > #endif > I have something that builds now.=C2=A0 Need to test. >=20 > I think we need to use _POSIX_VERSION as __STDC_VERSION__ is set by cpp. Looking at trigd.c, one finds #ifdef GFC_REAL_16_IS_FLOAT128 /* libquadmath. */ #define SUFFIX(x) x ## q #else #define SUFFIX(x) x ## l #endif /* GFC_REAL_16_IS_FLOAT128 */ So, hppa64 has REAL(16), but it does not use __float128 or=20 GFC_REAL_16_IS_FLOAT128 is somehow not getting set. Instead=20 of the above kludge you can do something like #ifndef HAVE_COSL #define cosl cosq /* Use libquadmath for hppa64. */ #endif HAVE_COSL, HAVE_SINL, HAVE_TANL are definitely available. I don't recall if fabsl and copysignl have similar macros.=