public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
@ 2020-04-13 21:22 danglin at gcc dot gnu.org
  2020-04-14  3:02 ` [Bug libfortran/94586] " kargl at gcc dot gnu.org
                   ` (45 more replies)
  0 siblings, 46 replies; 47+ messages in thread
From: danglin at gcc dot gnu.org @ 2020-04-13 21:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

            Bug ID: 94586
           Summary: trigd_lib.inc:84:28: error: implicit declaration of
                    function 'fmaf'
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
              Host: hppa64-hp-hpux11.11
            Target: hppa64-hp-hpux11.11
             Build: hppa64-hp-hpux11.11

libtool: compile:  /test/gnu/gcc/objdir/./gcc/xgcc
-B/test/gnu/gcc/objdir/./gcc/ -B/opt/gnu64/gcc/gcc-10/hppa64-hp-hpux11.11/bin/
-B/opt/gnu64/gcc/gcc-10/hppa64-hp-hpux11.11/lib/ -isystem
/opt/gnu64/gcc/gcc-10/hppa64-hp-hpux11.11/include -isystem
/opt/gnu64/gcc/gcc-10/hppa64-hp-hpux11.11/sys-include -fchecking=1
-DHAVE_CONFIG_H -I. -I../../../gcc/libgfortran
-iquote../../../gcc/libgfortran/io -I../../../gcc/libgfortran/../gcc
-I../../../gcc/libgfortran/../gcc/config
-I../../../gcc/libgfortran/../libquadmath -I../.././gcc
-I../../../gcc/libgfortran/../libgcc -I../libgcc
-I../../../gcc/libgfortran/../libbacktrace -I../libbacktrace -I../libbacktrace
-std=gnu11 -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wextra -Wwrite-strings
-Werror=implicit-function-declaration -Werror=vla -fcx-fortran-rules
-ffunction-sections -fdata-sections -g -O2 -MT trigd.lo -MD -MP -MF
.deps/trigd.Tpo -c ../../../gcc/libgfortran/intrinsics/trigd.c  -DPIC -o
.libs/trigd.o
../../../gcc/libgfortran/intrinsics/trigd.inc: In function 'sind_r4':
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: error: implicit
declaration of function 'fmaf' [-Werror=implicit-function-declaration]
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:74:21: note: in definition of macro
'SUFFIX'
   74 | #define SUFFIX(x)   x ## f
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:102:4: note: in expansion of
macro 'D2R'
  102 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: warning: incompatible
implicit declaration of built-in function 'fmaf'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:74:21: note: in definition of macro
'SUFFIX'
   74 | #define SUFFIX(x)   x ## f
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:102:4: note: in expansion of
macro 'D2R'
  102 |    D2R (x);
      |    ^~~
In file included from ../../../gcc/libgfortran/intrinsics/trigd_lib.inc:99,
                 from ../../../gcc/libgfortran/intrinsics/trigd.c:84:
../../../gcc/libgfortran/intrinsics/trigd.inc:1:1: note: include '<math.h>' or
provide a declaration of 'fmaf'
  +++ |+#include <math.h>
    1 | /* Implementation of the degree trignometric functions COSD, SIND,
TAND.
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: warning: incompatible
implicit declaration of built-in function 'fmaf'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:74:21: note: in definition of macro
'SUFFIX'
   74 | #define SUFFIX(x)   x ## f
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:198:4: note: in expansion of
macro 'D2R'
  198 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: note: include
'<math.h>' or provide a declaration of 'fmaf'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:74:21: note: in definition of macro
'SUFFIX'
   74 | #define SUFFIX(x)   x ## f
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:198:4: note: in expansion of
macro 'D2R'
  198 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc: In function 'cosd_r4':
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: warning: incompatible
implicit declaration of built-in function 'fmaf'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:74:21: note: in definition of macro
'SUFFIX'
   74 | #define SUFFIX(x)   x ## f
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:338:4: note: in expansion of
macro 'D2R'
  338 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: note: include
'<math.h>' or provide a declaration of 'fmaf'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:74:21: note: in definition of macro
'SUFFIX'
   74 | #define SUFFIX(x)   x ## f
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:338:4: note: in expansion of
macro 'D2R'
  338 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc: In function 'tand_r4':
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: warning: incompatible
implicit declaration of built-in function 'fmaf'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:74:21: note: in definition of macro
'SUFFIX'
   74 | #define SUFFIX(x)   x ## f
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:382:4: note: in expansion of
macro 'D2R'
  382 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: note: include
'<math.h>' or provide a declaration of 'fmaf'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:74:21: note: in definition of macro
'SUFFIX'
   74 | #define SUFFIX(x)   x ## f
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:382:4: note: in expansion of
macro 'D2R'
  382 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: warning: incompatible
implicit declaration of built-in function 'fmaf'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:74:21: note: in definition of macro
'SUFFIX'
   74 | #define SUFFIX(x)   x ## f
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:448:4: note: in expansion of
macro 'D2R'
  448 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: note: include
'<math.h>' or provide a declaration of 'fmaf'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:74:21: note: in definition of macro
'SUFFIX'
   74 | #define SUFFIX(x)   x ## f
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:448:4: note: in expansion of
macro 'D2R'
  448 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc: In function 'sind_r8':
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: error: implicit
declaration of function 'fma' [-Werror=implicit-function-declaration]
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:105:21: note: in definition of
macro 'SUFFIX'
  105 | #define SUFFIX(x)   x
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:102:4: note: in expansion of
macro 'D2R'
  102 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: warning: incompatible
implicit declaration of built-in function 'fma'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:105:21: note: in definition of
macro 'SUFFIX'
  105 | #define SUFFIX(x)   x
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:102:4: note: in expansion of
macro 'D2R'
  102 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: note: include
'<math.h>' or provide a declaration of 'fma'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:105:21: note: in definition of
macro 'SUFFIX'
  105 | #define SUFFIX(x)   x
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:102:4: note: in expansion of
macro 'D2R'
  102 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: warning: incompatible
implicit declaration of built-in function 'fma'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:105:21: note: in definition of
macro 'SUFFIX'
  105 | #define SUFFIX(x)   x
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:198:4: note: in expansion of
macro 'D2R'
  198 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: note: include
'<math.h>' or provide a declaration of 'fma'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:105:21: note: in definition of
macro 'SUFFIX'
  105 | #define SUFFIX(x)   x
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:198:4: note: in expansion of
macro 'D2R'
  198 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc: In function 'cosd_r8':
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: warning: incompatible
implicit declaration of built-in function 'fma'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:105:21: note: in definition of
macro 'SUFFIX'
  105 | #define SUFFIX(x)   x
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:338:4: note: in expansion of
macro 'D2R'
  338 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: note: include
'<math.h>' or provide a declaration of 'fma'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:105:21: note: in definition of
macro 'SUFFIX'
  105 | #define SUFFIX(x)   x
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:338:4: note: in expansion of
macro 'D2R'
  338 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc: In function 'tand_r8':
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: warning: incompatible
implicit declaration of built-in function 'fma'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:105:21: note: in definition of
macro 'SUFFIX'
  105 | #define SUFFIX(x)   x
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:382:4: note: in expansion of
macro 'D2R'
  382 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: note: include
'<math.h>' or provide a declaration of 'fma'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:105:21: note: in definition of
macro 'SUFFIX'
  105 | #define SUFFIX(x)   x
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:382:4: note: in expansion of
macro 'D2R'
  382 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: warning: incompatible
implicit declaration of built-in function 'fma'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:105:21: note: in definition of
macro 'SUFFIX'
  105 | #define SUFFIX(x)   x
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:448:4: note: in expansion of
macro 'D2R'
  448 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: note: include
'<math.h>' or provide a declaration of 'fma'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:105:21: note: in definition of
macro 'SUFFIX'
  105 | #define SUFFIX(x)   x
      |                     ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:448:4: note: in expansion of
macro 'D2R'
  448 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc: In function 'sind_r16':
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:55:56: error: implicit
declaration of function 'copysignl' [-Werror=implicit-function-declaration]
   55 | #define mpfr_copysign(rop, op1, op2, rnd) rop = SUFFIX(copysign)((op1),
(op2))
      |                                                        ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:92:7: note: in expansion of macro
'mpfr_copysign'
   92 |       mpfr_copysign (s, one, x, GFC_RND_MODE);
      |       ^~~~~~~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:55:56: warning: incompatible
implicit declaration of built-in function 'copysignl'
   55 | #define mpfr_copysign(rop, op1, op2, rnd) rop = SUFFIX(copysign)((op1),
(op2))
      |                                                        ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:92:7: note: in expansion of macro
'mpfr_copysign'
   92 |       mpfr_copysign (s, one, x, GFC_RND_MODE);
      |       ^~~~~~~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:55:56: note: include
'<math.h>' or provide a declaration of 'copysignl'
   55 | #define mpfr_copysign(rop, op1, op2, rnd) rop = SUFFIX(copysign)((op1),
(op2))
      |                                                        ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:92:7: note: in expansion of macro
'mpfr_copysign'
   92 |       mpfr_copysign (s, one, x, GFC_RND_MODE);
      |       ^~~~~~~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:57:46: error: implicit
declaration of function 'fabsl' [-Werror=implicit-function-declaration]
   57 | #define mpfr_abs(rop, op, rnd) (rop = SUFFIX(fabs)(op))
      |                                              ^~~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:111:7: note: in expansion of
macro 'mpfr_abs'
  111 |       mpfr_abs (x, x, GFC_RND_MODE);
      |       ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:57:46: warning: incompatible
implicit declaration of built-in function 'fabsl'
   57 | #define mpfr_abs(rop, op, rnd) (rop = SUFFIX(fabs)(op))
      |                                              ^~~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:111:7: note: in expansion of
macro 'mpfr_abs'
  111 |       mpfr_abs (x, x, GFC_RND_MODE);
      |       ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:57:46: note: include
'<math.h>' or provide a declaration of 'fabsl'
   57 | #define mpfr_abs(rop, op, rnd) (rop = SUFFIX(fabs)(op))
      |                                              ^~~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:111:7: note: in expansion of
macro 'mpfr_abs'
  111 |       mpfr_abs (x, x, GFC_RND_MODE);
      |       ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: error: implicit
declaration of function 'fmal' [-Werror=implicit-function-declaration]
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:198:4: note: in expansion of
macro 'D2R'
  198 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: warning: incompatible
implicit declaration of built-in function 'fmal'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:198:4: note: in expansion of
macro 'D2R'
  198 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: note: include
'<math.h>' or provide a declaration of 'fmal'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:198:4: note: in expansion of
macro 'D2R'
  198 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:76:45: error: implicit
declaration of function 'cosl' [-Werror=implicit-function-declaration]
   76 | #define mpfr_cos(rop, x, rnd) (rop = SUFFIX(cos)(x))
      |                                             ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:201:6: note: in expansion of
macro 'mpfr_cos'
  201 |      mpfr_cos (x, x, GFC_RND_MODE);
      |      ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:76:45: warning: incompatible
implicit declaration of built-in function 'cosl'
   76 | #define mpfr_cos(rop, x, rnd) (rop = SUFFIX(cos)(x))
      |                                             ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:201:6: note: in expansion of
macro 'mpfr_cos'
  201 |      mpfr_cos (x, x, GFC_RND_MODE);
      |      ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:76:45: note: include
'<math.h>' or provide a declaration of 'cosl'
   76 | #define mpfr_cos(rop, x, rnd) (rop = SUFFIX(cos)(x))
      |                                             ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:201:6: note: in expansion of
macro 'mpfr_cos'
  201 |      mpfr_cos (x, x, GFC_RND_MODE);
      |      ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:75:45: error: implicit
declaration of function 'sinl' [-Werror=implicit-function-declaration]
   75 | #define mpfr_sin(rop, x, rnd) (rop = SUFFIX(sin)(x))
      |                                             ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:203:6: note: in expansion of
macro 'mpfr_sin'
  203 |      mpfr_sin (x, x, GFC_RND_MODE);
      |      ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:75:45: warning: incompatible
implicit declaration of built-in function 'sinl'
   75 | #define mpfr_sin(rop, x, rnd) (rop = SUFFIX(sin)(x))
      |                                             ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:203:6: note: in expansion of
macro 'mpfr_sin'
  203 |      mpfr_sin (x, x, GFC_RND_MODE);
      |      ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:75:45: note: include
'<math.h>' or provide a declaration of 'sinl'
   75 | #define mpfr_sin(rop, x, rnd) (rop = SUFFIX(sin)(x))
      |                                             ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:203:6: note: in expansion of
macro 'mpfr_sin'
  203 |      mpfr_sin (x, x, GFC_RND_MODE);
      |      ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd.inc: In function 'cosd_r16':
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:57:46: warning: incompatible
implicit declaration of built-in function 'fabsl'
   57 | #define mpfr_abs(rop, op, rnd) (rop = SUFFIX(fabs)(op))
      |                                              ^~~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:234:7: note: in expansion of
macro 'mpfr_abs'
  234 |       mpfr_abs (ax, x, GFC_RND_MODE);
      |       ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:57:46: note: include
'<math.h>' or provide a declaration of 'fabsl'
   57 | #define mpfr_abs(rop, op, rnd) (rop = SUFFIX(fabs)(op))
      |                                              ^~~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:234:7: note: in expansion of
macro 'mpfr_abs'
  234 |       mpfr_abs (ax, x, GFC_RND_MODE);
      |       ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:62:45: warning: incompatible
implicit declaration of built-in function 'copysignl'
   62 | #define mpfr_set_zero(rop, s) (rop = SUFFIX(copysign)(0, (s)))
      |                                             ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:271:6: note: in expansion of
macro 'mpfr_set_zero'
  271 |      mpfr_set_zero (x, 0);
      |      ^~~~~~~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:62:45: note: include
'<math.h>' or provide a declaration of 'copysignl'
   62 | #define mpfr_set_zero(rop, s) (rop = SUFFIX(copysign)(0, (s)))
      |                                             ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:271:6: note: in expansion of
macro 'mpfr_set_zero'
  271 |      mpfr_set_zero (x, 0);
      |      ^~~~~~~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: warning: incompatible
implicit declaration of built-in function 'fmal'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:338:4: note: in expansion of
macro 'D2R'
  338 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: note: include
'<math.h>' or provide a declaration of 'fmal'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:338:4: note: in expansion of
macro 'D2R'
  338 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:75:45: warning: incompatible
implicit declaration of built-in function 'sinl'
   75 | #define mpfr_sin(rop, x, rnd) (rop = SUFFIX(sin)(x))
      |                                             ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:341:6: note: in expansion of
macro 'mpfr_sin'
  341 |      mpfr_sin (x, x, GFC_RND_MODE);
      |      ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:75:45: note: include
'<math.h>' or provide a declaration of 'sinl'
   75 | #define mpfr_sin(rop, x, rnd) (rop = SUFFIX(sin)(x))
      |                                             ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:341:6: note: in expansion of
macro 'mpfr_sin'
  341 |      mpfr_sin (x, x, GFC_RND_MODE);
      |      ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:76:45: warning: incompatible
implicit declaration of built-in function 'cosl'
   76 | #define mpfr_cos(rop, x, rnd) (rop = SUFFIX(cos)(x))
      |                                             ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:343:6: note: in expansion of
macro 'mpfr_cos'
  343 |      mpfr_cos (x, x, GFC_RND_MODE);
      |      ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:76:45: note: include
'<math.h>' or provide a declaration of 'cosl'
   76 | #define mpfr_cos(rop, x, rnd) (rop = SUFFIX(cos)(x))
      |                                             ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:343:6: note: in expansion of
macro 'mpfr_cos'
  343 |      mpfr_cos (x, x, GFC_RND_MODE);
      |      ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd.inc: In function 'tand_r16':
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:55:56: warning: incompatible
implicit declaration of built-in function 'copysignl'
   55 | #define mpfr_copysign(rop, op1, op2, rnd) rop = SUFFIX(copysign)((op1),
(op2))
      |                                                        ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:372:7: note: in expansion of
macro 'mpfr_copysign'
  372 |       mpfr_copysign (s, one, x, GFC_RND_MODE);
      |       ^~~~~~~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:55:56: note: include
'<math.h>' or provide a declaration of 'copysignl'
   55 | #define mpfr_copysign(rop, op1, op2, rnd) rop = SUFFIX(copysign)((op1),
(op2))
      |                                                        ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:372:7: note: in expansion of
macro 'mpfr_copysign'
  372 |       mpfr_copysign (s, one, x, GFC_RND_MODE);
      |       ^~~~~~~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:57:46: warning: incompatible
implicit declaration of built-in function 'fabsl'
   57 | #define mpfr_abs(rop, op, rnd) (rop = SUFFIX(fabs)(op))
      |                                              ^~~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:391:7: note: in expansion of
macro 'mpfr_abs'
  391 |       mpfr_abs (x, x, GFC_RND_MODE);
      |       ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:57:46: note: include
'<math.h>' or provide a declaration of 'fabsl'
   57 | #define mpfr_abs(rop, op, rnd) (rop = SUFFIX(fabs)(op))
      |                                              ^~~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:391:7: note: in expansion of
macro 'mpfr_abs'
  391 |       mpfr_abs (x, x, GFC_RND_MODE);
      |       ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: warning: incompatible
implicit declaration of built-in function 'fmal'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:448:4: note: in expansion of
macro 'D2R'
  448 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: note: include
'<math.h>' or provide a declaration of 'fmal'
   84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
      |                            ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:85:21: note: in expansion of
macro 'FMA'
   85 | #define D2R(x) (x = FMA((x), PIO180H, (x) * PIO180L))
      |                     ^~~
../../../gcc/libgfortran/intrinsics/trigd.inc:448:4: note: in expansion of
macro 'D2R'
  448 |    D2R (x);
      |    ^~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:77:45: error: implicit
declaration of function 'tanl' [-Werror=implicit-function-declaration]
   77 | #define mpfr_tan(rop, x, rnd) (rop = SUFFIX(tan)(x))
      |                                             ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:449:4: note: in expansion of
macro 'mpfr_tan'
  449 |    mpfr_tan (x, x, GFC_RND_MODE);
      |    ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:77:45: warning: incompatible
implicit declaration of built-in function 'tanl'
   77 | #define mpfr_tan(rop, x, rnd) (rop = SUFFIX(tan)(x))
      |                                             ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:449:4: note: in expansion of
macro 'mpfr_tan'
  449 |    mpfr_tan (x, x, GFC_RND_MODE);
      |    ^~~~~~~~
../../../gcc/libgfortran/intrinsics/trigd_lib.inc:77:45: note: include
'<math.h>' or provide a declaration of 'tanl'
   77 | #define mpfr_tan(rop, x, rnd) (rop = SUFFIX(tan)(x))
      |                                             ^~~
../../../gcc/libgfortran/intrinsics/trigd.c:175:19: note: in definition of
macro 'SUFFIX'
  175 | #define SUFFIX(x) x ## l
      |                   ^
../../../gcc/libgfortran/intrinsics/trigd.inc:449:4: note: in expansion of
macro 'mpfr_tan'
  449 |    mpfr_tan (x, x, GFC_RND_MODE);
      |    ^~~~~~~~
cc1: some warnings being treated as errors
Makefile:6410: recipe for target 'trigd.lo' failed
make[3]: *** [trigd.lo] Error 1
make[3]: *** Waiting for unfinished jobs....

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
@ 2020-04-14  3:02 ` kargl at gcc dot gnu.org
  2020-04-14  7:23 ` rguenth at gcc dot gnu.org
                   ` (44 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: kargl at gcc dot gnu.org @ 2020-04-14  3:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org ---
This appears to be a bogus report.  (In reply to John David Anglin from comment
#0)
> libtool: compile:  /test/gnu/gcc/objdir/./gcc/xgcc
> -B/test/gnu/gcc/objdir/./gcc/
> -B/opt/gnu64/gcc/gcc-10/hppa64-hp-hpux11.11/bin/
> -B/opt/gnu64/gcc/gcc-10/hppa64-hp-hpux11.11/lib/ -isystem
> /opt/gnu64/gcc/gcc-10/hppa64-hp-hpux11.11/include -isystem
> /opt/gnu64/gcc/gcc-10/hppa64-hp-hpux11.11/sys-include -fchecking=1
> -DHAVE_CONFIG_H -I. -I../../../gcc/libgfortran
> -iquote../../../gcc/libgfortran/io -I../../../gcc/libgfortran/../gcc
> -I../../../gcc/libgfortran/../gcc/config
> -I../../../gcc/libgfortran/../libquadmath -I../.././gcc
> -I../../../gcc/libgfortran/../libgcc -I../libgcc
> -I../../../gcc/libgfortran/../libbacktrace -I../libbacktrace
> -I../libbacktrace -std=gnu11 -Wall -Wstrict-prototypes -Wmissing-prototypes
> -Wold-style-definition -Wextra -Wwrite-strings
> -Werror=implicit-function-declaration -Werror=vla -fcx-fortran-rules
> -ffunction-sections -fdata-sections -g -O2 -MT trigd.lo -MD -MP -MF
> .deps/trigd.Tpo -c ../../../gcc/libgfortran/intrinsics/trigd.c  -DPIC -o
> .libs/trigd.o
> ../../../gcc/libgfortran/intrinsics/trigd.inc: In function 'sind_r4':
> ../../../gcc/libgfortran/intrinsics/trigd_lib.inc:84:28: error: implicit
> declaration of function 'fmaf' [-Werror=implicit-function-declaration]
>    84 | #define FMA(x,y,z)  SUFFIX(fma)((x), (y), (z))
>       |                            ^~~
>

Does math.h define fmaf?  If yes, this this is bogus bug report.
If no, please disable building gfortran on hppa64.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' 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
                   ` (43 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-04-14  7:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Not all targets have a C99 math runtime.  libgfortran configury tests for a
load
of C99 functions:

# Check for C99 (and other IEEE) math functions
GCC_CHECK_MATH_FUNC([acosf])
GCC_CHECK_MATH_FUNC([acos])
GCC_CHECK_MATH_FUNC([acosl])
GCC_CHECK_MATH_FUNC([acoshf])
...

but fails to check for fma[lf ] (I also don't see any uses of the HAVE_*
macros defined but that's another issue.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' 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
                   ` (42 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2020-04-14  7:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #3 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, Apr 14, 2020 at 07:23:32AM +0000, rguenth at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586
> 
> --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
> Not all targets have a C99 math runtime.  libgfortran configury tests for a
> load
> of C99 functions:
> 
> # Check for C99 (and other IEEE) math functions
> GCC_CHECK_MATH_FUNC([acosf])
> GCC_CHECK_MATH_FUNC([acos])
> GCC_CHECK_MATH_FUNC([acosl])
> GCC_CHECK_MATH_FUNC([acoshf])
> ...
> 
> but fails to check for fma[lf ] (I also don't see any uses of the HAVE_*
> macros defined but that's another issue.
> 

It is 2020.  If a target doesn't support C99, then
building gfortran should be prohibited.  The file 
libgfortran/intrinsics/c99_functions.c is nothing 
but a kludge, and I wrote a part of that file!

I also note that FreeBSD does not have a complete
C99 and building libstdc++ is broken because of 
this.  Yet, I can't get a trivially stupid patch
applied.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89991

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  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
                   ` (41 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: dave.anglin at bell dot net @ 2020-04-14 12:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #4 from dave.anglin at bell dot net ---
On 2020-04-13 11:02 p.m., kargl at gcc dot gnu.org wrote:
> Does math.h define fmaf?  If yes, this this is bogus bug report.
> If no, please disable building gfortran on hppa64.
No, math.h does not define fmaf.

Build was okay as of 20200403:
https://gcc.gnu.org/pipermail/gcc-testresults/2020-April/558420.html

                === gfortran tests ===


Running target unix
FAIL: gfortran.dg/unlimited_polymorphic_30.f03   -O0  execution test
FAIL: gfortran.dg/unlimited_polymorphic_30.f03   -O1  execution test
FAIL: gfortran.dg/unlimited_polymorphic_30.f03   -O2  execution test
FAIL: gfortran.dg/unlimited_polymorphic_30.f03   -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gfortran.dg/unlimited_polymorphic_30.f03   -O3 -g  execution test
FAIL: gfortran.dg/unlimited_polymorphic_30.f03   -Os  execution test

                === gfortran Summary ===

# of expected passes            51686
# of unexpected failures        6
# of expected failures          201
# of unsupported tests          428
/test/gnu/gcc/objdir/gcc/testsuite/gfortran/../../gfortran  version 10.0.1
20200403 (experimental) (GCC) 


I presume this was introduced by the following commit:
commit 57391ddaf39f7cb85825c32e83feb1435889da51
Author: Fritz Reese <foreese@gcc.gnu.org>
Date:   Tue Apr 7 11:59:36 2020 -0400

    Fix PR fortran/93871 and re-implement degree-valued trigonometric
intrinsics.

    2020-04-01  Fritz Reese  <foreese@gcc.gnu.org>
                Steven G. Kargl  <kargl@gcc.gnu.org>

    gcc/fortran/ChangeLog

            PR fortran/93871

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  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
                   ` (40 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2020-04-14 15:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, Apr 14, 2020 at 12:55:45PM +0000, dave.anglin at bell dot net wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586
> 
> --- Comment #4 from dave.anglin at bell dot net ---
> On 2020-04-13 11:02 p.m., kargl at gcc dot gnu.org wrote:
> > Does math.h define fmaf?  If yes, this this is bogus bug report.
> > If no, please disable building gfortran on hppa64.
> No, math.h does not define fmaf.
> 

After '#include <math.h>' in trigd.c, add

#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))
#endif

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  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
                   ` (39 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: dave.anglin at bell dot net @ 2020-04-14 17:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #6 from dave.anglin at bell dot net ---
On 2020-04-14 11:40 a.m., sgk at troutmask dot apl.washington.edu wrote:
> After '#include <math.h>' in trigd.c, add
>
> #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))
> #endif
>
Unfortunately, we also need copysignl, fabsl, cosl, sinl and tanl.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  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
                   ` (38 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2020-04-14 18:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #7 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, Apr 14, 2020 at 05:24:51PM +0000, dave.anglin at bell dot net wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586
> 
> --- Comment #6 from dave.anglin at bell dot net ---
> On 2020-04-14 11:40 a.m., sgk at troutmask dot apl.washington.edu wrote:
> > After '#include <math.h>' in trigd.c, add
> >
> > #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))
> > #endif
> >
> Unfortunately, we also need copysignl, fabsl, cosl, sinl and tanl.
> 

How are you getting to these?  These are protected by

#ifdef HAVE_GFC_REAL_10
#endif 

or 

#ifdef HAVE_GFC_REAL_16
#endif

Is hppa64 claiming support for a REAL type that it actually
doesn't support?

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

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  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
                   ` (37 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: dave.anglin at bell dot net @ 2020-04-14 20:48 UTC (permalink / raw)
  To: gcc-bugs

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.
>
> 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.

Dave

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2020-04-14 20:48 ` dave.anglin at bell dot net
@ 2020-04-14 22:08 ` sgk at troutmask dot apl.washington.edu
  2020-04-14 23:46 ` dave.anglin at bell dot net
                   ` (36 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2020-04-14 22:08 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2020-04-14 22:08 ` sgk at troutmask dot apl.washington.edu
@ 2020-04-14 23:46 ` dave.anglin at bell dot net
  2020-04-15 15:02 ` sgk at troutmask dot apl.washington.edu
                   ` (35 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: dave.anglin at bell dot net @ 2020-04-14 23:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #10 from dave.anglin at bell dot net ---
On 2020-04-14 6:08 p.m., sgk at troutmask dot apl.washington.edu wrote:
> 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
It appears GFC_REAL_16_IS_FLOAT128 is not getting set.  Will investigate.
There's a similar problem with the test dec_math.f90 which has started to fail

We have when the hpux long double library is available:

      /* Under HPUX, the __float128 type is a synonym for "long double".  */
      (*lang_hooks.types.register_builtin_type) (long_double_type_node,
                                                 "__float128");

We have __builtin_fabsq, __builtin_copysignq, __builtin_infq and
__builtin_huge_valq.
I suppose  I could add "l" versions.

#ifndef HAVE_COSL
#define cosl cosq  /* Use libquadmath for hppa64. */
#endif

Yes, that seems an option.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  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
                   ` (34 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2020-04-15 15:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #11 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, Apr 14, 2020 at 11:46:36PM +0000, dave.anglin at bell dot net wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586
> 
> --- Comment #10 from dave.anglin at bell dot net ---
> On 2020-04-14 6:08 p.m., sgk at troutmask dot apl.washington.edu wrote:
> > 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
> It appears GFC_REAL_16_IS_FLOAT128 is not getting set.  Will investigate.
> There's a similar problem with the test dec_math.f90 which has started to fail
> 
> We have when the hpux long double library is available:
> 
>       /* Under HPUX, the __float128 type is a synonym for "long double".  */
>       (*lang_hooks.types.register_builtin_type) (long_double_type_node,
>                                                  "__float128");
> 
> We have __builtin_fabsq, __builtin_copysignq, __builtin_infq and
> __builtin_huge_valq.
> I suppose  I could add "l" versions.
> 

This seems to be confusing the simply assumptions in 
libgfortran/kinds-override.h, which states

/* What are the C types corresponding to the real(kind=10) and
   real(kind=16) types? We currently rely on the following assumptions:
     -- if real(kind=10) exists, i.e. if HAVE_GFC_REAL_10 is defined,
        then it is necessarily the "long double" type
     -- if real(kind=16) exists, then:
         * if HAVE_GFC_REAL_10, real(kind=16) is "__float128"
         * otherwise, real(kind=16) is "long double"
   To allow to change this in the future, we create the
   GFC_REAL_16_IS_FLOAT128 macro that is used throughout libgfortran.  */

#if defined(HAVE_GFC_REAL_16)
# if defined(HAVE_GFC_REAL_10)
#  define GFC_REAL_16_IS_FLOAT128
#  if !defined(HAVE_FLOAT128)
#   error "Where has __float128 gone?"
#  endif
# else
#  define GFC_REAL_16_IS_LONG_DOUBLE
# endif
#endif

So, hpux does not have REAL(10) and has REAL(16).  This is doing
what it is designed to do based on the assumption that a target
like hpux with REAL(16) will define the long double functions 
with the 'l' suffix.  It seems the the fix for hpux is to change
the test to something like 

# if defined(HAVE_GFC_REAL_10) || defined(__HPUX__)

using, of course, whatever the relevant macro.  This will then
select the 'q' suffix.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  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
                   ` (33 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: dave.anglin at bell dot net @ 2020-04-15 15:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #12 from dave.anglin at bell dot net ---
On 2020-04-15 11:02 a.m., sgk at troutmask dot apl.washington.edu wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586
> 
> --- Comment #11 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
> On Tue, Apr 14, 2020 at 11:46:36PM +0000, dave.anglin at bell dot net wrote:
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586
>>
>> --- Comment #10 from dave.anglin at bell dot net ---
>> On 2020-04-14 6:08 p.m., sgk at troutmask dot apl.washington.edu wrote:
>>> 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
>> It appears GFC_REAL_16_IS_FLOAT128 is not getting set.  Will investigate.
>> There's a similar problem with the test dec_math.f90 which has started to fail
>>
>> We have when the hpux long double library is available:
>>
>>       /* Under HPUX, the __float128 type is a synonym for "long double".  */
>>       (*lang_hooks.types.register_builtin_type) (long_double_type_node,
>>                                                  "__float128");
>>
>> We have __builtin_fabsq, __builtin_copysignq, __builtin_infq and
>> __builtin_huge_valq.
>> I suppose  I could add "l" versions.
>>
> 
> This seems to be confusing the simply assumptions in 
> libgfortran/kinds-override.h, which states
> 
> /* What are the C types corresponding to the real(kind=10) and
>    real(kind=16) types? We currently rely on the following assumptions:
>      -- if real(kind=10) exists, i.e. if HAVE_GFC_REAL_10 is defined,
>         then it is necessarily the "long double" type
>      -- if real(kind=16) exists, then:
>          * if HAVE_GFC_REAL_10, real(kind=16) is "__float128"
>          * otherwise, real(kind=16) is "long double"
>    To allow to change this in the future, we create the
>    GFC_REAL_16_IS_FLOAT128 macro that is used throughout libgfortran.  */
> 
> #if defined(HAVE_GFC_REAL_16)
> # if defined(HAVE_GFC_REAL_10)
> #  define GFC_REAL_16_IS_FLOAT128
> #  if !defined(HAVE_FLOAT128)
> #   error "Where has __float128 gone?"
> #  endif
> # else
> #  define GFC_REAL_16_IS_LONG_DOUBLE
> # endif
> #endif
> 
> So, hpux does not have REAL(10) and has REAL(16).  This is doing
> what it is designed to do based on the assumption that a target
> like hpux with REAL(16) will define the long double functions 
> with the 'l' suffix.  It seems the the fix for hpux is to change
> the test to something like 
> 
> # if defined(HAVE_GFC_REAL_10) || defined(__HPUX__)
> 
> using, of course, whatever the relevant macro.  This will then
> select the 'q' suffix.

I tried the above approach yesterday but it led to a couple of undefined
symbols in libgfortran that
caused a new test fail.  Possibly, the above might be a better overall approach
but this is what I ended
up doing last night:

diff --git a/libgfortran/intrinsics/trigd.c b/libgfortran/intrinsics/trigd.c
index 81699069545..970c60952ee 100644
--- a/libgfortran/intrinsics/trigd.c
+++ b/libgfortran/intrinsics/trigd.c
@@ -27,6 +27,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If
not, see

 #include <math.h>

+#if (_POSIX_VERSION < 200112L)
+#define fmaf(a,b,c) ((a)*(b)+(c))
+#define fma(a,b,c) ((a)*(b)+(c))
+#endif

 /*
    For real x, let {x}_P or x_P be the closest representible number in the
@@ -169,7 +173,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. 
If not, see
 #define COSD        cosd_r16
 #define TAND        tand_r16

-#ifdef GFC_REAL_16_IS_FLOAT128 /* libquadmath.  */
+#if defined(GFC_REAL_16_IS_FLOAT128) || !defined(HAVE_COSL) /* libquadmath. 
*/
 #define SUFFIX(x) x ## q
 #else
 #define SUFFIX(x) x ## l

This fixed build of trigd.c.  I think I need to do something similar to fix
dec_math.f90:

FAIL: gfortran.dg/dec_math.f90   -O0  (test for excess errors)
Excess errors:
/usr/ccs/bin/ld: Unsatisfied symbols:
   tanl (first referenced in /var/tmp//ccLGIJFM.o) (code)
   asinl (first referenced in /var/tmp//ccLGIJFM.o) (code)
   sinl (first referenced in /var/tmp//ccLGIJFM.o) (code)
   acosl (first referenced in /var/tmp//ccLGIJFM.o) (code)
   atanl (first referenced in /var/tmp//ccLGIJFM.o) (code)
   atan2l (first referenced in /var/tmp//ccLGIJFM.o) (code)
   cosl (first referenced in /var/tmp//ccLGIJFM.o) (code)

It's the only new fail.

It might be better to add configure checks for fmaf and fma.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  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
                   ` (32 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: dave.anglin at bell dot net @ 2020-04-15 18:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #13 from dave.anglin at bell dot net ---
On 2020-04-15 11:28 a.m., John David Anglin wrote:
> I tried the above approach yesterday but it led to a couple of undefined symbols in libgfortran that
> caused a new test fail.
The following symbols are missing:

/usr/lib/dld.sl: Unresolved symbol: strtoflt128 (data)  from
/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgfortran/.libs/libgfortran.sl.5
/usr/lib/dld.sl: Unresolved module for symbol: _gfortrani_si_max (code)  from
/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgfortran/.libs/libgfortran.sl.5

This causes abort in PR19872.exe and other tests:
13            read(1,*)i
(gdb)
warning: Unable to find symbol for 0x2ec0
warning: Unable to find symbol for 0x2ec0
warning: Unable to find symbol for 0x2ec0
warning: Unable to find symbol for 0x2ec0
warning: Unable to find symbol for 0x2ed8
warning: Unable to find symbol for 0x2ed8
warning: Unable to find symbol for 0x2ed8
warning: Unable to find symbol for 0x2ed8
warning: Unable to find symbol for 0x2ef0
warning: Unable to find symbol for 0x2ef0
warning: Unable to find symbol for 0x2ef0
warning: Unable to find symbol for 0x2ef0
/usr/lib/dld.sl: Unresolved symbol: strtoflt128 (data)  from
/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgfortran/.libs/libgfortran.sl.5
/usr/lib/dld.sl: Unresolved module for symbol: _gfortrani_si_max (code)  from
/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgfortran/.libs/libgfortran.sl.5

Program received signal SIGABRT, Aborted.
0xc00423b0 in kill () from /usr/lib/dld.sl

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  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
                   ` (31 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2020-04-15 18:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #14 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Wed, Apr 15, 2020 at 03:28:29PM +0000, dave.anglin at bell dot net wrote:
> 
> On 2020-04-15 11:02 a.m., sgk at troutmask dot apl.washington.edu wrote:
> > 
> > #if defined(HAVE_GFC_REAL_16)
> > # if defined(HAVE_GFC_REAL_10)
> > #  define GFC_REAL_16_IS_FLOAT128
> > #  if !defined(HAVE_FLOAT128)
> > #   error "Where has __float128 gone?"
> > #  endif
> > # else
> > #  define GFC_REAL_16_IS_LONG_DOUBLE
> > # endif
> > #endif
> > 
> > So, hpux does not have REAL(10) and has REAL(16).  This is doing
> > what it is designed to do based on the assumption that a target
> > like hpux with REAL(16) will define the long double functions 
> > with the 'l' suffix.  It seems the the fix for hpux is to change
> > the test to something like 
> > 
> > # if defined(HAVE_GFC_REAL_10) || defined(__HPUX__)
> > 
> > using, of course, whatever the relevant macro.  This will then
> > select the 'q' suffix.
> 
> I tried the above approach yesterday but it led to a couple of undefined
> symbols in libgfortran that
> caused a new test fail.  Possibly, the above might be a better overall approach

It likely is the start of an approach, but it seems hpux is conflating 
long double and __float128, where it flips between an 'l' and 'q' suffix.
gfortran simply assumes a correspondence with C types and C99 naming
conventions (e.g., sinf, sin, and sinl).  If a target has REAL(4), REAL(8),
REAL(10), and REAL(16) the correspondence is float, double, long double,
and __float128, respectively.  If a target has REAL(4), REAL(8), and REAL(16),
then the correspondence is float, double, and long double.  There is no
__float128, and by extension, no functions with a 'q' suffix.  The long
double math function will end in 'l'.

> but this is what I ended
> up doing last night:
> 
> diff --git a/libgfortran/intrinsics/trigd.c b/libgfortran/intrinsics/trigd.c
> index 81699069545..970c60952ee 100644
> --- a/libgfortran/intrinsics/trigd.c
> +++ b/libgfortran/intrinsics/trigd.c
> @@ -27,6 +27,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If
> not, see
> 
>  #include <math.h>
> 
> +#if (_POSIX_VERSION < 200112L)
> +#define fmaf(a,b,c) ((a)*(b)+(c))
> +#define fma(a,b,c) ((a)*(b)+(c))
> +#endif
> 
>  /*
>     For real x, let {x}_P or x_P be the closest representible number in the
> @@ -169,7 +173,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. 
> If not, see
>  #define COSD        cosd_r16
>  #define TAND        tand_r16
> 
> -#ifdef GFC_REAL_16_IS_FLOAT128 /* libquadmath.  */
> +#if defined(GFC_REAL_16_IS_FLOAT128) || !defined(HAVE_COSL) /* libquadmath. 
> */
>  #define SUFFIX(x) x ## q
>  #else
>  #define SUFFIX(x) x ## l
> 
> This fixed build of trigd.c.  I think I need to do something similar to fix
> dec_math.f90:
> 
> FAIL: gfortran.dg/dec_math.f90   -O0  (test for excess errors)
> Excess errors:
> /usr/ccs/bin/ld: Unsatisfied symbols:
>    tanl (first referenced in /var/tmp//ccLGIJFM.o) (code)
>    asinl (first referenced in /var/tmp//ccLGIJFM.o) (code)
>    sinl (first referenced in /var/tmp//ccLGIJFM.o) (code)
>    acosl (first referenced in /var/tmp//ccLGIJFM.o) (code)
>    atanl (first referenced in /var/tmp//ccLGIJFM.o) (code)
>    atan2l (first referenced in /var/tmp//ccLGIJFM.o) (code)
>    cosl (first referenced in /var/tmp//ccLGIJFM.o) (code)
> 
> It's the only new fail.

What does -fdump-tree-original show for

function foo(x)
   real(16) foo, x
   foo = cos(x)
end function foo

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  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
                   ` (30 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2020-04-15 18:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #15 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Wed, Apr 15, 2020 at 06:04:08PM +0000, dave.anglin at bell dot net wrote:
> 
> /usr/lib/dld.sl: Unresolved symbol: strtoflt128 (data)  from

This should be in libquadmath.

% nm /usr/home/kargl/work/lib/libquadmath.a | grep strtoflt
strtoflt128.o:
00000880 T strtoflt128

> /test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgfortran/.libs/libgfortran.sl.5
> /usr/lib/dld.sl: Unresolved module for symbol: _gfortrani_si_max (code)  from

This should be in libgfortran and comes from libgfortran/io/read.c.
It is unclear why it would be missing.

Given that confusion that hpux seems to be causing
for libgfortran, it seems the --disable-libquadmath
is your best option.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  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
                   ` (29 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: dave.anglin at bell dot net @ 2020-04-15 19:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #16 from dave.anglin at bell dot net ---
On 2020-04-15 2:14 p.m., sgk at troutmask dot apl.washington.edu wrote:
> It likely is the start of an approach, but it seems hpux is conflating 
> long double and __float128, where it flips between an 'l' and 'q' suffix.
> gfortran simply assumes a correspondence with C types and C99 naming
> conventions (e.g., sinf, sin, and sinl).  If a target has REAL(4), REAL(8),
> REAL(10), and REAL(16) the correspondence is float, double, long double,
> and __float128, respectively.  If a target has REAL(4), REAL(8), and REAL(16),
> then the correspondence is float, double, and long double.  There is no
> __float128, and by extension, no functions with a 'q' suffix.  The long
> double math function will end in 'l'.
It's not hpux conflating long double and __float128.  On hppa, there's a IEEE
128-bit float type
defined in the architecture and a limited set of arithmetic routines available
to manipulate this type.
There's no C99 support until HP-UX 11i version 2.  Even then, no long double
routines were implemented
for PA-RISC.

IA64 has REAL(10). There's routine for both double extended (w) and  long
double (l).  Initially, the
REAL(10) type was __float80.  REAL(16) on IA64 is quad (q).  __float128 is not
used by HP-UX.

There's no REAL(10) or REAL(16) on hppa.  Treating REAL(16) as __float128 was
my choice some years
ago.  It seemed compatible with gcc's __float128 on IA64 and I wanted to take
advantage of libquadmath
if possible.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  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
                   ` (28 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: dave.anglin at bell dot net @ 2020-04-15 19:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #17 from dave.anglin at bell dot net ---
On 2020-04-15 2:32 p.m., sgk at troutmask dot apl.washington.edu wrote:
> On Wed, Apr 15, 2020 at 06:04:08PM +0000, dave.anglin at bell dot net wrote:
>> /usr/lib/dld.sl: Unresolved symbol: strtoflt128 (data)  from
> This should be in libquadmath.
>
> % nm /usr/home/kargl/work/lib/libquadmath.a | grep strtoflt
> strtoflt128.o:
> 00000880 T strtoflt128
>
It is.  The problem is read.o is looking for a data symbol.  Need to look at
libgfortran(read.o):

/usr/ccs/bin/ld: Unsatisfied symbols:
   strtoflt128 (first referenced in
/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgfortran/.libs/libgfortran.a(read.o))
(data)

There's a missing declaration for strtoflt128.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  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
                   ` (27 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: dave.anglin at bell dot net @ 2020-04-16  1:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #18 from dave.anglin at bell dot net ---
On 2020-04-15 2:14 p.m., sgk at troutmask dot apl.washington.edu wrote:
> What does -fdump-tree-original show for
>
> function foo(x)
>    real(16) foo, x
>    foo = cos(x)
> end function foo
foo (real(kind=16) & restrict x)
{
  real(kind=16) __result_foo;

  __result_foo = __builtin_cosl (*x);
  return __result_foo;
}

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  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
                   ` (26 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: dave.anglin at bell dot net @ 2020-04-16  1:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #19 from dave.anglin at bell dot net ---
On 2020-04-15 2:32 p.m., sgk at troutmask dot apl.washington.edu wrote:
> On Wed, Apr 15, 2020 at 06:04:08PM +0000, dave.anglin at bell dot net wrote:
>> /usr/lib/dld.sl: Unresolved symbol: strtoflt128 (data)  from
> This should be in libquadmath.
>
> % nm /usr/home/kargl/work/lib/libquadmath.a | grep strtoflt
> strtoflt128.o:
> 00000880 T strtoflt128
>
This fixes the link issues but we are still left with cosl instead of cosq. 
HP-UX doesn't support weak
very well.

diff --git a/libgfortran/intrinsics/trigd.c b/libgfortran/intrinsics/trigd.c
index 81699069545..ba92fbd0cb1 100644
--- a/libgfortran/intrinsics/trigd.c
+++ b/libgfortran/intrinsics/trigd.c
@@ -27,6 +27,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If
not, see

 #include <math.h>

+#if (_POSIX_VERSION < 200112L)
+#define fmaf(a,b,c) ((a)*(b)+(c))
+#define fma(a,b,c) ((a)*(b)+(c))
+#endif

 /*
    For real x, let {x}_P or x_P be the closest representible number in the
diff --git a/libgfortran/kinds-override.h b/libgfortran/kinds-override.h
index baa0f7e1cb5..38e70be542a 100644
--- a/libgfortran/kinds-override.h
+++ b/libgfortran/kinds-override.h
@@ -34,7 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If
not, see
    GFC_REAL_16_IS_FLOAT128 macro that is used throughout libgfortran.  */

 #if defined(HAVE_GFC_REAL_16)
-# if defined(HAVE_GFC_REAL_10)
+# if defined(HAVE_GFC_REAL_10) || defined(__hpux__)
 #  define GFC_REAL_16_IS_FLOAT128
 #  if !defined(HAVE_FLOAT128)
 #   error "Where has __float128 gone?"
diff --git a/libquadmath/quadmath_weak.h b/libquadmath/quadmath_weak.h
index a97c813a013..2bbd2a11233 100644
--- a/libquadmath/quadmath_weak.h
+++ b/libquadmath/quadmath_weak.h
@@ -23,7 +23,7 @@ Boston, MA 02110-1301, USA.  */

 #include "quadmath.h"

-#if SUPPORTS_WEAK
+#if SUPPORTS_WEAK && !defined(__hpux__)
 # define __qmath2(name,name2,type) \
   static __typeof(type) name __attribute__ ((__weakref__(#name2))) \
             __quadmath_throw;

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (18 preceding siblings ...)
  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
                   ` (25 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2020-04-16  2:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #20 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Thu, Apr 16, 2020 at 01:10:21AM +0000, dave.anglin at bell dot net wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586
> 
> --- Comment #18 from dave.anglin at bell dot net ---
> On 2020-04-15 2:14 p.m., sgk at troutmask dot apl.washington.edu wrote:
> > What does -fdump-tree-original show for
> >
> > function foo(x)
> >    real(16) foo, x
> >    foo = cos(x)
> > end function foo
> foo (real(kind=16) & restrict x)
> {
>   real(kind=16) __result_foo;
> 
>   __result_foo = __builtin_cosl (*x);
>   return __result_foo;
> }

This is what I anticipated after I sent the email. 
With -fno-builtin, you'll get cosl, which you don't
have.  So, you'll need to figure out how to force 
gfortran to use 'q' suffixes instead of 'l'.  I don't
know how the frontend will handle this.  Using weak
references as you suggested in your other reply might
be the easily (if it worked).

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (19 preceding siblings ...)
  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
                   ` (24 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: danglin at gcc dot gnu.org @ 2020-04-16 20:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #21 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 48295
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48295&action=edit
Patch to fix float128 node selection on hpux

With this change, the libquadmath routines are now selected on hpux.

Testing.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (20 preceding siblings ...)
  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
                   ` (23 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2020-04-16 21:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #22 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Thu, Apr 16, 2020 at 08:06:00PM +0000, danglin at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586
> 
> --- Comment #21 from John David Anglin <danglin at gcc dot gnu.org> ---
> Created attachment 48295
>   --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48295&action=edit
> Patch to fix float128 node selection on hpux
> 
> With this change, the libquadmath routines are now selected on hpux.
> 
> Testing.
> 

It is unclear to me if the patch will meet everyone's
expectation.  In particular, there are currently no 
target-specific macros used in the Fortran frontend.
Using 'defined(__hpux__)' may make some unhappy as 
it now complicates maintenance and adding new Fortran
features.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (21 preceding siblings ...)
  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
                   ` (22 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: dave.anglin at bell dot net @ 2020-04-16 21:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #23 from dave.anglin at bell dot net ---
On 2020-04-16 5:07 p.m., sgk at troutmask dot apl.washington.edu wrote:
> It is unclear to me if the patch will meet everyone's
> expectation.  In particular, there are currently no 
> target-specific macros used in the Fortran frontend.
> Using 'defined(__hpux__)' may make some unhappy as 
> it now complicates maintenance and adding new Fortran
> features.
Can I include "../../libgfortran/libgfortran.h" in these frontend routines? 
This would pull in
the defines for GFC_REAL_16_IS_FLOAT128 and GFC_REAL_16_IS_LONG_DOUBLE.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (22 preceding siblings ...)
  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
                   ` (21 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2020-04-17  0:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #24 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Thu, Apr 16, 2020 at 09:32:46PM +0000, dave.anglin at bell dot net wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586
> 
> --- Comment #23 from dave.anglin at bell dot net ---
> On 2020-04-16 5:07 p.m., sgk at troutmask dot apl.washington.edu wrote:
> > It is unclear to me if the patch will meet everyone's
> > expectation.  In particular, there are currently no 
> > target-specific macros used in the Fortran frontend.
> > Using 'defined(__hpux__)' may make some unhappy as 
> > it now complicates maintenance and adding new Fortran
> > features.
> Can I include "../../libgfortran/libgfortran.h" in these frontend routines? 
> This would pull in
> the defines for GFC_REAL_16_IS_FLOAT128 and GFC_REAL_16_IS_LONG_DOUBLE.
> 

That might be worse, but you're in territory that I've not tread.
I suggest you send an email to both fortran@ and gcc@ asking for
input from more experienced contributors.  Don't hold your
breath too long on fortran@ replies.  Several of us have
stop contributing because of the git transition.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (23 preceding siblings ...)
  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
                   ` (20 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-21 17:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #25 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Perhaps the PR94694 patch could help (or further extended version thereof).

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (24 preceding siblings ...)
  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
                   ` (19 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: danglin at gcc dot gnu.org @ 2020-04-21 17:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

John David Anglin <danglin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #48295|0                           |1
        is obsolete|                            |

--- Comment #26 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 48327
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48327&action=edit
Patch to fix float128 node selection on hpux

This is my latest patch to fix the float128.  In this iteration, I have
attempted
to create a target hook to allow REAL16 to be float128 instead of long double.

Previous version had a problem with iroundq.  Need to use long double builtins.

This version is untested.  With previous version, there was one new test fail
(probably it didn't run before) and one XPASS.  So, using libquadmath is
working out quite well.

Have no objection to having configure checks for fmaf and fma.  That's better
than my POSIX check.

Sorry, this is going slowly but testing takes awhile.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (25 preceding siblings ...)
  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
                   ` (18 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: danglin at gcc dot gnu.org @ 2020-04-21 17:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #27 from John David Anglin <danglin at gcc dot gnu.org> ---
This build on hppa2.0w-hp-hpux11.11 had a previous version of my float128
patch:
https://gcc.gnu.org/pipermail/gcc-testresults/2020-April/559390.html

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (26 preceding siblings ...)
  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
                   ` (17 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: danglin at gcc dot gnu.org @ 2020-04-21 20:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

John David Anglin <danglin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #48327|0                           |1
        is obsolete|                            |

--- Comment #28 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 48331
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48331&action=edit
Patch to fix float128 node selection on hpux

Fix tm.texi.in.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (27 preceding siblings ...)
  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
                   ` (16 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: foreese at gcc dot gnu.org @ 2020-04-22 14:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

Fritz Reese <foreese at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |foreese at gcc dot gnu.org

--- Comment #29 from Fritz Reese <foreese at gcc dot gnu.org> ---
John, I wonder could you output your generated kinds.h? It will be in
$GCCBUILD/stageN-<arch-tuple>/libgfortran/kinds.h if your build has made it far
enough. If you have a functional gfortran you can also generate it with
"$GCCSOURCE/libgfortran/mk-kinds-h.sh gfortran". This header is supposed to
expose the core type which gfortran uses for REAL(16) according to the target.

I'd also like to know the results of building with the two patches in pr94694.
I think you should keep the target-specific portions of your patch, including
mods to gcc/fortran/trans-types.c, but I think you should then be able to drop
the changes to libgfortran/intrinsics/trigd.c and libgfortran/kinds-override.h.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (28 preceding siblings ...)
  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
                   ` (15 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: danglin at gcc dot gnu.org @ 2020-04-22 15:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

John David Anglin <danglin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #48331|0                           |1
        is obsolete|                            |

--- Comment #30 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 48352
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48352&action=edit
Patch to fix float128 node selection on hpux

Restore change to fix float128 builtins.  Handle iround specially.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (29 preceding siblings ...)
  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
                   ` (14 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: dave.anglin at bell dot net @ 2020-04-22 15:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #31 from dave.anglin at bell dot net ---
Fritz, I have a build going with the patch which I just attached.  I realized
last night that the change
I made to address the problem with iroundq was wrong.

I should be able to answer your questions shortly.

I haven't looked at the patches in pr94694 but I believe that configure should
be able to detect the
core type used for REAL(16) from gfortran.  kinds-override.h seems like a hack
to me.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (30 preceding siblings ...)
  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
                   ` (13 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: danglin at gcc dot gnu.org @ 2020-04-22 15:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #32 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 48354
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48354&action=edit
Header file

This is kinds.h generated with gcc-8.  Note we have "typedef long double
GFC_REAL_16;".

I'm attempting to change this to float128 so that we use libquadmath instead of
the non existent support for long double.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (31 preceding siblings ...)
  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
                   ` (12 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: dave.anglin at bell dot net @ 2020-04-22 16:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #33 from dave.anglin at bell dot net ---
On 2020-04-22 10:54 a.m., foreese at gcc dot gnu.org wrote:
> If you have a functional gfortran you can also generate it with
> "$GCCSOURCE/libgfortran/mk-kinds-h.sh gfortran". This header is supposed to
> expose the core type which gfortran uses for REAL(16) according to the target.
Looking at script, I see it has same logic to disambiguate long double and
float128:
      16) if [ $long_double_kind -eq 10 ]; then
            ctype="__float128"
            cplxtype="_Complex float __attribute__((mode(TC)))"
            suffix="q"
          else
            ctype="long double"
            cplxtype="complex long double"
            suffix="l"
          fi ;;

It always selects long double when both are REAL(16).

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (32 preceding siblings ...)
  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
                   ` (11 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2020-04-22 16:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #34 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Wed, Apr 22, 2020 at 04:02:01PM +0000, dave.anglin at bell dot net wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586
> 
> --- Comment #33 from dave.anglin at bell dot net ---
> On 2020-04-22 10:54 a.m., foreese at gcc dot gnu.org wrote:
> > If you have a functional gfortran you can also generate it with
> > "$GCCSOURCE/libgfortran/mk-kinds-h.sh gfortran". This header is supposed to
> > expose the core type which gfortran uses for REAL(16) according to the target.
> Looking at script, I see it has same logic to disambiguate long double and
> float128:
>       16) if [ $long_double_kind -eq 10 ]; then
>             ctype="__float128"
>             cplxtype="_Complex float __attribute__((mode(TC)))"
>             suffix="q"
>           else
>             ctype="long double"
>             cplxtype="complex long double"
>             suffix="l"
>           fi ;;
> 
> It always selects long double when both are REAL(16).
> 

Which is the correct assumption that I already explained.
Both the ISO C binding module and the IEEE 754 modules 
assume a C99 type mapping.  There are only 2 cases:

REAL(4)  <--> float       ! f suffix
REAL(8)  <--> double      ! no suffix
REAL(10) <--> long double ! l suffix
REAL(16) <--> __float128  ! q suffix

or 

REAL(4)  <--> float       ! f suffix
REAL(8)  <--> double      ! no suffix
REAL(16) <--> long double ! l suffix  (if long double exists)

I suspect that having HPUX map 

REAL(4)  <--> float       ! f suffix
REAL(8)  <--> double      ! no suffix
REAL(16) <--> __float128  ! q suffix

may cause issues with either ISO C binding or IEEE 754 module 
or both.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (33 preceding siblings ...)
  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
                   ` (10 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: dave.anglin at bell dot net @ 2020-04-22 17:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #35 from dave.anglin at bell dot net ---
On 2020-04-22 12:27 p.m., sgk at troutmask dot apl.washington.edu wrote:
> I suspect that having HPUX map 
>
> REAL(4)  <--> float       ! f suffix
> REAL(8)  <--> double      ! no suffix
> REAL(16) <--> __float128  ! q suffix
>
> may cause issues with either ISO C binding or IEEE 754 module 
> or both.
Why?  It's what HP did?

On ia64, libm contains a full quad implementation with q suffix.  Both l and w
sufixes are used
with 80-bit floating types (long double and double extended).

Many targets have double and long double both mapped to  the same 64-bit
floating type.

So, I don't see why long double and __float128 can't be mapped to the same
128-bit floating type.
It's been that way for years.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (34 preceding siblings ...)
  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
                   ` (9 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-22 19:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #36 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:1868599f8daf7798018ce8a8f314015f5a2ac520

commit r10-7893-g1868599f8daf7798018ce8a8f314015f5a2ac520
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Apr 22 19:17:15 2020 +0200

    libgfortran: Provide some further math library fallbacks [PR94694]

    The following patch provides some further math library fallbacks.
    fmaf can be implemented using fma if available, fma and fmal can use
    x * y + z as fallback, it is not perfect, but e.g. glibc on various arches
    has been using that as fallback for many years,
    and copysign/copysignl/fabs/fabsl can be implemented using corresponding
    __builtin_* if we make sure that gcc expands it inline instead of using
    a library call (these days it is expanded inline on most targets).

    2020-04-22  Jakub Jelinek  <jakub@redhat.com>

            PR libfortran/94694
            PR libfortran/94586
            * configure.ac: Add math func checks for fmaf, fma and fmal.  Add
            HAVE_INLINE_BUILTIN_COPYSIGN check.
            * c99_protos.h (copysign, fmaf, fma, fmal): Provide fallback
            prototypes.
            (HAVE_COPYSIGN, HAVE_FMAF, HAVE_FMA, HAVE_FMAL): Define if not
            defined and fallback version is provided.
            * intrinsics/c99_functions.c (copysign, fmaf, fma, fmal): Provide
            fallback implementations if possible
            * configure: Regenerated.
            * config.h.in: Regenerated.

            * math.m4 (GCC_CHECK_MATH_INLINE_BUILTIN_FALLBACK1,
            GCC_CHECK_MATH_INLINE_BUILTIN_FALLBACK2): New.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (35 preceding siblings ...)
  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
                   ` (8 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: danglin at gcc dot gnu.org @ 2020-04-22 19:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

John David Anglin <danglin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #48352|0                           |1
        is obsolete|                            |

--- Comment #37 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 48356
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48356&action=edit
Patch to fix float128 node selection on hpux

Fix build (missing target.h include).

I'm going to remove libgfortran changes and retest.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (36 preceding siblings ...)
  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
                   ` (7 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: danglin at gcc dot gnu.org @ 2020-04-22 19:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #38 from John David Anglin <danglin at gcc dot gnu.org> ---
Because mk-kinds-h.sh has not been modifies, we still get long double in
kinds.h with gcc-10:

typedef long double GFC_REAL_16;
typedef complex long double GFC_COMPLEX_16;

However with my patch, this does not seem to matter.  The following
program

function foo(x)
   real(16) foo, x
   foo = cos(x)
end function foo

generates a call to cosq.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (37 preceding siblings ...)
  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
                   ` (6 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: danglin at gcc dot gnu.org @ 2020-04-22 21:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

John David Anglin <danglin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #48356|0                           |1
        is obsolete|                            |

--- Comment #39 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 48357
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48357&action=edit
Patch to fix float128 node selection on hpux

Modify mk-kinds-h.sh to auto detect whether to use long double or __float128
for REAL(16).

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (38 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-23 14:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #40 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Fritz Reese <foreese@gcc.gnu.org>:

https://gcc.gnu.org/g:e8eecc2a919033ad4224756a8759d8e94c0e4bc2

commit r10-7913-ge8eecc2a919033ad4224756a8759d8e94c0e4bc2
Author: Fritz Reese <foreese@gcc.gnu.org>
Date:   Wed Apr 22 11:45:22 2020 -0400

    Protect the trigd functions in libgfortran from unavailable math functions.

    libgfortran/ChangeLog:

    2020-04-22  Fritz Reese  <foreese@gcc.gnu.org>

            PR libfortran/94694
            PR libfortran/94586
            * intrinsics/trigd.c, intrinsics/trigd_lib.inc,
intrinsics/trigd.inc:
            Guard against unavailable math functions.
            Use suffixes from kinds.h based on the REAL kind.

    gcc/fortran/ChangeLog:

    2020-04-22  Fritz Reese  <foreese@gcc.gnu.org>

            * trigd_fe.inc: Use mpfr to compute cosd(30) rather than a host-
            precision floating point literal based on an invalid macro.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (39 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-23 14:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586
Bug 94586 depends on bug 94694, which changed state.

Bug 94694 Summary: [10 Regression][libgfortran] libgfortran does not compile on bare-metal aarch64-none-elf (newlib)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94694

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (40 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-04-24 11:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #41 from Richard Biener <rguenth at gcc dot gnu.org> ---
If this is now fixed can you close the bug as such please, John?

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (41 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-24 11:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #42 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think this one is not fixed yet, there is some pa hpux specific patch.  See
e.g. #c39.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (42 preceding siblings ...)
  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
  45 siblings, 0 replies; 47+ messages in thread
From: danglin at gcc dot gnu.org @ 2020-04-24 11:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

--- Comment #43 from John David Anglin <danglin at gcc dot gnu.org> ---
The fix for PR 94694 fixed the build on hppa2.0w-hp-hpux11.11.

We are left with the following new fails in dec_math.f90:
FAIL: gfortran.dg/dec_math.f90   -O0  (test for excess errors)
FAIL: gfortran.dg/dec_math.f90   -O0  execution test
FAIL: gfortran.dg/dec_math.f90   -O1  (test for excess errors)
FAIL: gfortran.dg/dec_math.f90   -O1  execution test
FAIL: gfortran.dg/dec_math.f90   -O2  (test for excess errors)
FAIL: gfortran.dg/dec_math.f90   -O2  execution test
FAIL: gfortran.dg/dec_math.f90   -O3 -fomit-frame-pointer -funroll-loops
-fpeel-
loops -ftracer -finline-functions  (test for excess errors)
FAIL: gfortran.dg/dec_math.f90   -O3 -fomit-frame-pointer -funroll-loops
-fpeel-
loops -ftracer -finline-functions  execution test
FAIL: gfortran.dg/dec_math.f90   -O3 -g  (test for excess errors)
FAIL: gfortran.dg/dec_math.f90   -O3 -g  execution test
FAIL: gfortran.dg/dec_math.f90   -Os  (test for excess errors)
FAIL: gfortran.dg/dec_math.f90   -Os  execution test

This is caused by the missing 'l' suffix routines:
spawn /test/gnu/gcc/objdir/gcc/testsuite/gfortran/../../gfortran
-B/test/gnu/gcc/objdir/gcc/testsuite/gfortran/../../
-B/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgfortran/
/test/gnu/gcc/gcc/gcc/testsuite/gfortran.dg/dec_math.f90
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never -fdiagnostics-urls=never -O0 -cpp -std=gnu
-B/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgfortran/.libs
-L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgfortran/.libs
-L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgfortran/.libs
-L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libatomic/.libs
-B/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libquadmath/.libs
-L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libquadmath/.libs
-L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libquadmath/.libs -lm -o
./dec_math.exe
/usr/ccs/bin/ld: Unsatisfied symbols:
   tanl (first referenced in /var/tmp//ccQhSJVu.o) (code)
   asinl (first referenced in /var/tmp//ccQhSJVu.o) (code)
   sinl (first referenced in /var/tmp//ccQhSJVu.o) (code)
   acosl (first referenced in /var/tmp//ccQhSJVu.o) (code)
   atanl (first referenced in /var/tmp//ccQhSJVu.o) (code)
   atan2l (first referenced in /var/tmp//ccQhSJVu.o) (code)
   cosl (first referenced in /var/tmp//ccQhSJVu.o) (code)
collect2: error: ld returned 1 exit status
compiler exited with status 1

While I will continue to work on a change to use the 'q' routines from
libquadmath on hppa-hpux, this is of lower priority.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (43 preceding siblings ...)
  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
  45 siblings, 0 replies; 47+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-07-20 10:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-07-20
           Priority|P3                          |P4
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1

--- Comment #44 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Target issue?

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [Bug libfortran/94586] trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf'
  2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' danglin at gcc dot gnu.org
                   ` (44 preceding siblings ...)
  2020-07-20 10:18 ` dominiq at lps dot ens.fr
@ 2020-07-20 19:53 ` danglin at gcc dot gnu.org
  45 siblings, 0 replies; 47+ messages in thread
From: danglin at gcc dot gnu.org @ 2020-07-20 19:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94586

John David Anglin <danglin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #48357|0                           |1
        is obsolete|                            |

--- Comment #45 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 48901
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48901&action=edit
Patch to use libquadmath with gfortran on hpux

This patch enables the use of libquadmath with gfortran on hpux.  There is no
system support for long double (or __flat128) math, so it would be nice if we
could use the libquadmath support for __float128.

The attached patch works with both 32 and 64-bit hpux targets.  There are a
couple of testsuite fails that I haven't had time to investigate yet.  But
mostly it works.

^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2020-07-20 19:53 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 21:22 [Bug libfortran/94586] New: trigd_lib.inc:84:28: error: implicit declaration of function 'fmaf' 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
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

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).