Segmentation fault while printing a DoubleFloat (1.0.1)

This problem appears with the release version of the library only, whenever writing a DoubleFloat to a TextWriter, for example:

stdout << 2.5
The origin is a bad optimization by the compiler in the type DoubleFloat so the fix is to recompile it without optimization as follows:
  • If you have not yet untarred the libaldor sources, then go to the src directory of Aldor and issue
    tar -xvzf libaldor.tar.gz
  • Go to the libaldor/arith directory and issue
    aldor -q1 -fo sal_dfloat.as
    which will create an unoptimized version of sal_dfloat.o
  • If you have write permission to the lib directory of Aldor, then move sal_dfloat.o there and issue
    ar rv libaldor.a sal_dfloat.o
    followed by
    ranlib libaldor.a
    which will replace sal_dfloat.o by its unoptimized version.
  • Otherwise, if you cannot overwrite libaldor.a then add sal_dfloat.o to your compiler command line whenever creating an executable with the release library, for example:
    aldor -fx -laldor myprogram.as sal_dfloat.o
    This is not necessary if you modified libaldor.a as explained above. Also, do not use that version sal_dfloat.o if you compile with the -dDEBUG option and link with the debug library.
    Last update: 19 July 2002