[freenet-devl] Re: Yet another GCJ update. (a/k/a PR 1615followup)

Mark J. Roberts mjr@statesmean.com
Sat Feb 24 20:27:00 GMT 2001


On 24 Feb 2001, Per Bothner wrote:

> "Mark J. Roberts" <mjr@statesmean.com> writes:
>
> > This patch breaks BigInteger.divide:
>
> So it does.  It seems like I need to merge in more code ...
> Could you try this patch instead?

This looks OK with my test program, which tests just about every method,
and also with Freenet. Cool.

Today I found a different bug in the BigInteger(byte[]) constructor, where
bogus output is returned:

import java.math.BigInteger;

public class Test {
    public static void main(String[] args) {
        byte b[] = {73, -106, 2, -46}; // aka "1234567890"
        System.out.println(new BigInteger(b));
    }
}

mjr::mjr$ javac Test.java ; java -cp . Test
1234567890
mjr::mjr$ gcj --main=Test -o test Test.java ; ./test
0

The value returned is not always 0, but it seems to be for smallish
values.


-- 
Mark Roberts
mjr@statesmean.com




More information about the Java mailing list