This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

java/1265: Lossage with BigInteger.java (probable compiler bug)



>Number:         1265
>Category:       java
>Synopsis:       Lossage with BigInteger.java (probable compiler bug)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          closed
>Class:          mistaken
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:18:29 PST 2000
>Closed-Date:    Wed Jun 07 00:06:36 PDT 2000
>Last-Modified:  Wed Jun  7 00:16:00 PDT 2000
>Originator:     zastai@hotmail.com
>Release:        gcj 2.95.2
>Organization:
>Environment:
i386-pc-msdosdjgpp
>Description:
 * BigInteger.java (part of libgcj) can't generate a class
   file:
----
BigInteger.java: In class `java.math.BigInteger':
BigInteger.java: In method `isNegative()':
BigInteger.java:283: internal error - SP mismatch
----

   However if this:
----
  private final boolean isNegative()
  {
    return (words == null ? ival : words[ival - 1]) < 0;
  }
----
   is replaced by this less efficient, but equivalent code:
----
  private final boolean isNegative()
  {
    if(words == null) return (ival < 0);
    else return (words[ival - 1] < 0);
  }
----
   it works just fine.
   <This bug has also been submitted to the gcc-bugs list>
>How-To-Repeat:
Try to generate a class file from BigInteger.java.
>Fix:
Find & fix compiler bug, or use change suggested above as workaround.
>Release-Note:

>Audit-Trail:

Formerly PR gcj/247


From: Bryce McKinlay <bryce@albatross.co.nz>
To: zastai@hotmail.com
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/247: Lossage with BigInteger.java (probable compiler bug)
Date: Fri, 26 May 2000 20:15:39 +1200

 Are you trying to build a cvs/snapshot libgcj with gcc 2.95.2? Did you
 apply my 2.95.2 java patches (see http://waitaki.otago.ac.nz/~bryce/)
 before trying to do this? If you didn't, you will have a lot of
 difficulty building recent libgcjs.
 
 This is a known compiler bug that was fixed a long time ago: see PR
 gcj/155.
 
 regards
 
   [ bryce ]
 
 zastai@hotmail.com wrote:
 
 > BigInteger.java: In class `java.math.BigInteger':
 > BigInteger.java: In method `isNegative()':
 > BigInteger.java:283: internal error - SP mismatch
 
State-Changed-From-To: open->closed
State-Changed-By: bryce
State-Changed-When: Wed Jun  7 00:06:36 2000
State-Changed-Why:
    This bug was already fixed (see PR gcj/155). Use the latest
    cvs compiler.

From: bryce@albatross.co.nz
To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com, zastai@hotmail.com
Cc:  
Subject: Re: gcj/247
Date: 7 Jun 2000 07:06:36 -0000

 Synopsis: Lossage with BigInteger.java (probable compiler bug)
 
 State-Changed-From-To: open->closed
 State-Changed-By: bryce
 State-Changed-When: Wed Jun  7 00:06:36 2000
 State-Changed-Why:
     This bug was already fixed (see PR gcj/155). Use the latest
     cvs compiler.
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=247&database=java
>Unformatted:



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]