[RFC] Quad-float support in Fortran

Tobias Burnus burnus@net-b.de
Sun Nov 7 18:38:00 GMT 2010


Am 07.11.2010 12:53, schrieb Angelo Graziosi:
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000000 in ?? ()
> (gdb) bt
> #0 0x00000000 in ?? ()
> #1 0x004203d9 in write_float ()
> #2 0x00413ad0 in _gfortrani_write_real ()
> #3 0x0040e934 in _gfortrani_list_formatted_write ()

Hmm, that does not tell much - seemingly, libqfortran/libquad is 
compiled without debugging symbols.

Actually, if you compile your program statically, it indeed might be a 
problem with weak ref. Can you compile your program using:

   gfortran -Wl,--whole-archive -lquadmath -Wl,--no-whole-archive test.f90

or completely static:

   gfortran -static  \
   -Wl,--whole-archive \
     -lpthread -lquadmath \
   -Wl,--no-whole-archive test.f90

Otherwise, the weak symbols might not be pulled in.

The next question is: Why is there no .dll be generated for libquadmath? 
And, how does one best deal with those weak-ref side effects?

Tobias

PS: I just saw that my patch does not work if no weakrefs are available 
due to a bug in quadmath_weak.h and/or the usage of the symbols in 
libgfortran/m4/mtypes.m4 and libgfortran/io/. I will fix it in the next 
iteration of the patch.



More information about the Fortran mailing list