egcs-980129 (and gcc) crash with xlisp's xlbignum.c
Horst von Brand
vonbrand@pc17.usm.edu.ec
Fri Jan 30 08:47:00 GMT 1998
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;
}
}
--
Horst von Brand mailto:vonbrand@pc17.usm.edu.ec
More information about the Gcc-bugs
mailing list