Bill Allombert on Mon, 23 Sep 2002 20:16:51 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: gcc-3.1.1 on alpha


On Tue, Jul 30, 2002 at 06:00:55PM -0400, Igor Schein wrote:
> Hi,
> 
> gcc-3.1.1 miscompiles latest CVS pari code on alpha-linux:
> 
> ? conjvec(Mod(x^2+x+1,x^3-x-1))
>   ***   bug in GP (Floating Point Exception), please report
> 
> That's with debugging binary + alpha kernel.  With generic kernel it
> works fine. 

I am able to reproduce it on alpha-linux and  gcc 3.2.1 (Debian prerelease).

In fact:
? install(mulsi,"LG")
? mulsi(1,1)
%2 = 0

which is not as documented...

It look like that the offending line is
src/kernel/none/mp.c:757

750     mulsispec(long x, GEN y, long ny)
751     {
752       GEN yd, z = (GEN)avma;
753       long lz = ny+3;
754       LOCAL_HIREMAINDER;
755
756       (void)new_chunk(lz);
757       yd = y + ny; *--z = mulll(x, *--yd);

At this point, *z is 0 instead of 1.

Cheers,

Bill.