For testing: full __float128 patch

Dominique Dhumieres dominiq@lps.ens.fr
Mon Aug 30 10:54:00 GMT 2010


Hi FX,

With --with-quad=/opt/sw64 --disable-multilib I have been able to
bootstrap on x86_64-apple-darwin10. However first I have to
compile with -L/opt/sw64/lib -lquad to link with the quad lib.
Second the following test (derived from gfortran.dg/float128_1.f90)

  real(kind=16) :: x1, x2
  complex(kind=16) :: z1, z2

  real(kind=10) :: y

!  read (*,*) x1
  x1 = 1.0
  x2 = sqrt(x1)                         ! sqrtq
  z1 = x1 + (0._16 , 1.0_16)
  z2 = z1 / (1._16, 2._16)

  x1 = abs(z2)                          ! cabsq


  y = 2
  y = cos(y)                            ! cosl

  print *, x1, x2, z1, z2, y

end

segfault when executed. The trace is

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
cabsq (z=<invalid float value> + -9.0016861960741218295629079326791936e-2960 * I) at math/complex.c:51
51	  return hypotq (REALPART (z), IMAGPART (z));
(gdb) bt
#0  cabsq (z=<invalid float value> + -9.0016861960741218295629079326791936e-2960 * I) at math/complex.c:51
#1  0x0000000100000cc9 in MAIN__ ()
#2  0x0000000100000e04 in main ()

If I comment out the line "x1 = abs(z2)" the segfault goes
away.

As said on IRC building a multilib for libgfortran fails
with unknown symbols (coming from libquad) at -m32.

Thanks for the work,

Dominique



More information about the Fortran mailing list