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

zastai@hotmail.com zastai@hotmail.com
Fri May 26 00:40:00 GMT 2000


>Number:         247
>Category:       gcj
>Synopsis:       Lossage with BigInteger.java (probable compiler bug)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 26 00:40:01 PDT 2000
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


More information about the Java-prs mailing list