This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix Jacks testsuite invocation


Tom Tromey wrote:

> On my box I get zero fail and zero xpass from jacks.  Could you take a
> look at this?  Details about the problems should be put into files in
> the jacks tree in the build directory.

The majority of the errors turned out to be another setup problem
apparently, as they go away when . is added to the CLASSPATH.

These are cases where gcj is invoked with two Java files on the
command line, where the second references a package defined by
the first.  Without . in CLASSPATH, this fails with a package
not found error.

Interestingly, there is code in the main jacks.tcl that explicitly
adds . to the CLASSPATH, but only for compile_and_run test cases.
For compile-only cases, this is (apparently deliberately) not done.
I'm not sure about the Java semantics here; is this supposed to
work or not?

Of the remaining failures, these
FAIL: 5.1.3-dtl-1
FAIL: 5.1.3-dtl-2
FAIL: 5.1.3-ftl-1
FAIL: 5.1.3-ftl-2
XPASS: 3.10.2-round-6
appear to be related; they have to do with what happens in the
case of floating point overflow.  This is possibly a genuine
platform-dependent bug; I'll see if I can find something here.

The final two cases appear to be platform-independent:
FAIL: 13.4.8-constant-runtime-1
FAIL: 14.19.2-runtime-try-1

==== 13.4.8-constant-runtime-1  References to constant variables
        must be inlined  FAILED
==== Contents of test case:

    compile [saveas T1348cr1a.java {
class T1348cr1a {
    final int i = 1;
    final String s = "a";
    static final int i1 = 2;
    static final String s1 = "b";
}
}] [saveas T1348cr1b.java {
class T1348cr1b {
    public static void doit() {
        T1348cr1a a = new T1348cr1a();
        System.out.print(a.i + a.s + a.i1 + a.s1);
    }
}
}]
    compile [saveas T1348cr1a.java {
class T1348cr1a {
    final int i = 3;
    final String s = "c";
    static final int i1 = 4;
    static final String s1 = "d";
}
}]
compile_and_run [saveas T1348cr1c.java {
class T1348cr1c {
    public static void main(String[] args) {
        try {
            Class c = Class.forName("T1348cr1b");
            c.getMethod("doit", null).invoke(null, null);
        } catch (Exception e) {
            System.out.println(e);
        }
    }
}
    }]

---- Result was:
3c2b
---- Result should have been:
1a2b
==== 13.4.8-constant-runtime-1 FAILED


==== 14.19.2-runtime-try-1  runtime try
        catch finally test with synchronize statement  FAILED
==== Contents of test case:

    compile_and_run [saveas T14192rt1.java {
class T14192rt1 {
    public static void main(String [] args) {
        Object o = new Object();
        try {
            synchronized (o) {
                System.out.print("O");
                return;
            }
        }
        finally {
            try {
                raise();
            }
            catch (Exception e) {
                System.out.print("K");
            }
        }
    }
    public static void raise() throws Exception {
        throw new Exception();
    }
}
    }]

---- Result was:
Exception in thread "main" java.lang.VerifyError: verification failed at PC 36 in T14192rt1:main(([Ljava.lang.String;)V): incompatible type in local variable
   <<No stacktrace available>>

---- Result should have been:
OK
==== 14.19.2-runtime-try-1 FAILED


These touch areas of Java semantics I'm not familiar with;
any suggestions what the problem could be here?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


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