egcs-980129 (and gcc) crash with xlisp's xlbignum.c

Jeffrey A Law law@cygnus.com
Sun Aug 16 01:33:00 GMT 1998


  In message <199801301145.QAA00563@pc16.usm.edu.ec>you write:
  > The following makes gcc-2.7.2.3 (from RedHat-5.0), gcc-2.8.0 and
  > egcs-980129 crash on i586-pc-linux-gnu when compiled with -O2. Without
  > optimization the compilation finishes without troubles. I'm using
  > glibc-2.0.6-9 (RedHat update) and binutils-2.8.1.0.19
  > 
  > extern __inline  double
  > ldexp (double __x, int __y)
  > {
  >   register double __value;
  >   __asm __volatile__
  >     ("fscale"
  >      : "=t" (__value) : "0" (__x), "u" ((double) __y));
  > 
  >   return __value;
  > }
  > 
  > void cvtflobignum () 
  > {
  >   unsigned short *v;
  >   int size, shift;
  >   double mantissa;
  > 
  >   if (shift < 16)
  >     mantissa = ldexp(mantissa, -shift);
  > 
  >    
  >   for (; size > 0 && mantissa != 0.0; size--, v++) {
  >     mantissa = ldexp(mantissa, 16);
  >     *v = (unsigned short) mantissa;
  >   }
  > }
This seems to be working fine on the egcs-1.1 branch.

jeff



More information about the Gcc-bugs mailing list