java/3803: buggy code generation

Alexandre Petit-Bianco apbianco@cygnus.com
Wed Aug 15 11:23:00 GMT 2001


> Happens of course only if I compile the java-files.  Not with the
> class files.

OK. It seems to be related to java/3096 and java/3965:

  http://gcc.gnu.org/ml/java-prs/2001-q2/msg00070.html

So I rewrote the only loop that uses a pre-incremented array access
and the test started to work:

  RC5 Java Demo (gregh@lightspeed.net)
  Keys: 256 keys
  Time: 1 ms
  Rate: 256000 keys/sec
  Keys: 512 keys
  Time: 4 ms
  Rate: 128000 keys/sec
  Keys: 768 keys
  Time: 6 ms
  Rate: 128000 keys/sec

java/3096 and java/3965 are next on my list of things to do. I'll keep
you posted.

./A

--- RC5test.java~       Wed Aug 15 10:57:52 2001
+++ RC5test.java        Wed Aug 15 11:07:58 2001
@@ -36,7 +36,7 @@ class RC5test implements Runnable {
         //break;
       }
       int i = 0;
-      while (++key[i] == 0) {
+      for (key[i]++; key[i] == 0; key[i]++) {
         i++;
         if (i >= 1) {
           long now = System.currentTimeMillis();



More information about the Gcc-bugs mailing list