public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla@gcc.gnu.org> 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 [thread overview] Message-ID: <bug-94586-4-0tlgKKsd4L@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-94586-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586 --- Comment #9 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- 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=94586 > > --- 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. There's enough support to build libquadmath. 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. Need to test. > > 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 GFC_REAL_16_IS_FLOAT128 is somehow not getting set. Instead 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.
next prev parent reply other threads:[~2020-04-14 22:08 UTC|newest] Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-13 21:22 [Bug libfortran/94586] New: " danglin at gcc dot gnu.org 2020-04-14 3:02 ` [Bug libfortran/94586] " kargl at gcc dot gnu.org 2020-04-14 7:23 ` rguenth at gcc dot gnu.org 2020-04-14 7:51 ` sgk at troutmask dot apl.washington.edu 2020-04-14 12:55 ` dave.anglin at bell dot net 2020-04-14 15:40 ` sgk at troutmask dot apl.washington.edu 2020-04-14 17:24 ` dave.anglin at bell dot net 2020-04-14 18:12 ` sgk at troutmask dot apl.washington.edu 2020-04-14 20:48 ` dave.anglin at bell dot net 2020-04-14 22:08 ` sgk at troutmask dot apl.washington.edu [this message] 2020-04-14 23:46 ` dave.anglin at bell dot net 2020-04-15 15:02 ` sgk at troutmask dot apl.washington.edu 2020-04-15 15:28 ` dave.anglin at bell dot net 2020-04-15 18:04 ` dave.anglin at bell dot net 2020-04-15 18:14 ` sgk at troutmask dot apl.washington.edu 2020-04-15 18:32 ` sgk at troutmask dot apl.washington.edu 2020-04-15 19:10 ` dave.anglin at bell dot net 2020-04-15 19:26 ` dave.anglin at bell dot net 2020-04-16 1:10 ` dave.anglin at bell dot net 2020-04-16 1:15 ` dave.anglin at bell dot net 2020-04-16 2:10 ` sgk at troutmask dot apl.washington.edu 2020-04-16 20:06 ` danglin at gcc dot gnu.org 2020-04-16 21:07 ` sgk at troutmask dot apl.washington.edu 2020-04-16 21:32 ` dave.anglin at bell dot net 2020-04-17 0:58 ` sgk at troutmask dot apl.washington.edu 2020-04-21 17:03 ` jakub at gcc dot gnu.org 2020-04-21 17:29 ` danglin at gcc dot gnu.org 2020-04-21 17:36 ` danglin at gcc dot gnu.org 2020-04-21 20:17 ` danglin at gcc dot gnu.org 2020-04-22 14:54 ` foreese at gcc dot gnu.org 2020-04-22 15:12 ` danglin at gcc dot gnu.org 2020-04-22 15:33 ` dave.anglin at bell dot net 2020-04-22 15:47 ` danglin at gcc dot gnu.org 2020-04-22 16:02 ` dave.anglin at bell dot net 2020-04-22 16:27 ` sgk at troutmask dot apl.washington.edu 2020-04-22 17:10 ` dave.anglin at bell dot net 2020-04-22 19:34 ` cvs-commit at gcc dot gnu.org 2020-04-22 19:44 ` danglin at gcc dot gnu.org 2020-04-22 19:58 ` danglin at gcc dot gnu.org 2020-04-22 21:41 ` danglin at gcc dot gnu.org 2020-04-23 14:12 ` cvs-commit at gcc dot gnu.org 2020-04-23 14:38 ` jakub at gcc dot gnu.org 2020-04-24 11:35 ` rguenth at gcc dot gnu.org 2020-04-24 11:37 ` jakub at gcc dot gnu.org 2020-04-24 11:58 ` danglin at gcc dot gnu.org 2020-07-20 10:18 ` dominiq at lps dot ens.fr 2020-07-20 19:53 ` danglin at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-94586-4-0tlgKKsd4L@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).