[RFC] Full float128, third iteration
FX
fxcoudert@gmail.com
Sat Sep 11 13:51:00 GMT 2010
> (1) I need to compile with -lquad (even if I use the patch in
> http://gcc.gnu.org/ml/fortran/2010-09/msg00250.html ,
> although I may need to bootstrap to use it?)
Hum, that is interesting. With shared libraries, you still need to specifiy -lquad explicitly on the command line?
Can you location your libgfortran .dylib file, and run "otool -L" on it?
> Undefined symbols:
> "__gfortran_pow_r16_i4", referenced from
Makes sense... It requires a one-line patch to Makefile.am:
Index: Makefile.am
===================================================================
--- Makefile.am (revision 164128)
+++ Makefile.am (working copy)
@@ -543,6 +551,7 @@ i_pow_c = \
$(srcdir)/generated/pow_i4_i4.c \
$(srcdir)/generated/pow_i8_i4.c \
$(srcdir)/generated/pow_i16_i4.c \
+$(srcdir)/generated/pow_r16_i4.c \
$(srcdir)/generated/pow_c4_i4.c \
$(srcdir)/generated/pow_c8_i4.c \
$(srcdir)/generated/pow_c10_i4.c \
and then building the new generated file by build once in maintainer mode. I'll add that to the next iteration of my patch.
> (3) gfortran.dg/promotion.f90 is failing and contrary to Steve I think
> this should be fixed.
The testcase needs to be fixed, but the current behaviour is fine according to the doc:
> -fdefault-real-8
> Set the default real type to an 8 byte wide type. Do nothing if this is already the default. This option also affects the kind of non-double real constants like 1.0, and does promote the default width of DOUBLE PRECISION to 16 bytes if possible, unless -fdefault-double-8 is given, too.
So the testcase should simply be passed -fdefault-double-8:
Index: gcc/testsuite/gfortran.dg/promotion.f90
===================================================================
--- gcc/testsuite/gfortran.dg/promotion.f90 (revision 164128)
+++ gcc/testsuite/gfortran.dg/promotion.f90 (working copy)
@@ -1,6 +1,6 @@
! { dg-do run { target i?86-*-* x86_64-*-* } }
! { dg-require-effective-target ilp32 }
-! { dg-options "-fdefault-integer-8 -fdefault-real-8" }
+! { dg-options "-fdefault-integer-8 -fdefault-real-8 -fdefault-double-8" }
program a
logical l
integer i
> real(16) :: z
> z=nearest(z,1.0_16)
>
> fails at link time with
>
> Undefined symbols:
> "_huge_valq", referenced from:
This is a shortcoming of my handling of builtins... huge_val is actually on of the only built-ins availble in quad-float variant, which my patch misses (how ironic!). But here, we could do without it anyway, so I'm testing a patch for that.
FX
More information about the Fortran
mailing list