public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* egcs-980129 (and gcc) crash with xlisp's xlbignum.c
@ 1998-01-30 8:47 Horst von Brand
1998-08-16 1:33 ` Jeffrey A Law
0 siblings, 1 reply; 2+ messages in thread
From: Horst von Brand @ 1998-01-30 8:47 UTC (permalink / raw)
To: egcs-bugs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: egcs-980129 (and gcc) crash with xlisp's xlbignum.c
1998-01-30 8:47 egcs-980129 (and gcc) crash with xlisp's xlbignum.c Horst von Brand
@ 1998-08-16 1:33 ` Jeffrey A Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeffrey A Law @ 1998-08-16 1:33 UTC (permalink / raw)
To: Horst von Brand; +Cc: egcs-bugs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-08-16 1:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-30 8:47 egcs-980129 (and gcc) crash with xlisp's xlbignum.c Horst von Brand
1998-08-16 1:33 ` Jeffrey A Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).