No support for denormalized numbers on alpha

Mark Wieringa Mark.Wieringa@atnf.csiro.au
Wed Jan 20 00:35:00 GMT 1999


The following program fails with a floating exception when compiled with
egcs 1.1.1.

#include <iostream.h>
#include <float.h>
#include <values.h>

int main()
{
  double a=DBL_MIN; // smallest normalized double
  double b=MINDOUBLE; // smallest double
  double c=0.999;
  cout << "a="<< a<< endl;
  a*=c;
  cout << "a*=c; with c="<<c<<endl;
  cout << "a="<< a<< endl;
  cout << "b="<< b<< endl;
  b*=c;
  cout << "b*=c; with c="<<c<<endl;
  cout << "b="<< b<< endl;
  return 0;
}

Output:
kaputar-138% tUnnormalized
a=2.22507e-308
a*=c; with c=0.999
a=0
Floating exception

Output with Dec cxx -ieee:
a=2.22507e-308
a*=c; with c=0.999
a=2.22285e-308
b=4.94066e-324
b*=c; with c=0.999
b=4.94066e-324


Command output:

kaputar-142% /usr/local/egcs/bin/c++ -v --save-temps -D__cplusplus -DAIPS_NONAMESPACE -DAIPS_OSF -DAIPS_LITTLE_ENDIAN     -I. -I/aips++/code/aips/implement/test -I/aips++/mwiering/code/include -I/aips++/mwiering/alpha_egcs -I/aips++/code/include -c -O2 -DNATIVE_EXCP -fno-implicit-templates -fguiding-decls tUnnormalized.cc
Reading specs from /usr/local/egcs/lib/gcc-lib/alphaev56-dec-osf4.0b/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
 /usr/local/egcs/lib/gcc-lib/alphaev56-dec-osf4.0b/egcs-2.91.60/cpp -lang-c++ -v -I. -I/aips++/code/aips/implement/test -I/aips++/mwiering/code/include -I/aips++/mwiering/alpha_egcs -I/aips++/code/include -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -Dunix -D__osf__ -D_LONGLONG -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__unix__ -D__osf__ -D_LONGLONG -D__SYSTYPE_BSD__ -D_SYSTYPE_BSD -D__unix -D__SYSTYPE_BSD -Asystem(unix) -Asystem(xpg4) -D__EXCEPTIONS -D__OPTIMIZE__ -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus -Acpu(alpha) -Amachine(alpha) -D__alpha -D__alpha__ -D__alpha_ev5__ -Acpu(ev5) -D__alpha_bwx__ -Acpu(bwx) -D__cplusplus -DAIPS_NONAMESPACE -DAIPS_OSF -DAIPS_LITTLE_ENDIAN -DNATIVE_EXCP tUnnormalized.cc tUnnormalized.ii
GNU CPP version egcs-2.91.60 19981201 (egcs-1.1.1 release)
#include "..." search starts here:
#include <...> search starts here:
 .
 /aips++/code/aips/implement/test
 /aips++/mwiering/code/include
 /aips++/mwiering/alpha_egcs
 /aips++/code/include
 /usr/local/egcs/include/g++
 /usr/local/include
 /usr/local/egcs/alphaev56-dec-osf4.0b/include
 /usr/local/egcs/lib/gcc-lib/alphaev56-dec-osf4.0b/egcs-2.91.60/include
 /usr/include
End of search list.
 /usr/local/egcs/lib/gcc-lib/alphaev56-dec-osf4.0b/egcs-2.91.60/cc1plus tUnnormalized.ii -quiet -dumpbase tUnnormalized.cc -O2 -version -fno-implicit-templates -fguiding-decls -o tUnnormalized.s
GNU C++ version egcs-2.91.60 19981201 (egcs-1.1.1 release) (alphaev56-dec-osf4.0b) compiled by GNU C version egcs-2.91.60 19981201 (egcs-1.1.1 release).
 as -g -nocpp -O0 -o tUnnormalized.o tUnnormalized.s
 /usr/local/egcs/lib/gcc-lib/alphaev56-dec-osf4.0b/egcs-2.91.60/mips-tfile -v -I tUnnormalized.o~ -o tUnnormalized.o tUnnormalized.s
mips-tfile version egcs-2.91.60 19981201 (egcs-1.1.1 release)

---------------------------------------------------------------------------
email: mwiering@atnf.csiro.au
mail : M.H. Wieringa, ATNF, Locked Bag 194, Narrabri NSW 2390, Australia
Tel. : +61-2-6790 4040 (home: 6792 5796, switch: 6790 4000, fax: 6790 4090)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: tUnnormalized.ii.gz
Type: application/x-gzip
Size: 6178 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19990120/45855c20/attachment.bin>


More information about the Gcc-bugs mailing list