I've been getting a verification error trying to compile BerkeleyDB Java Edition to native code from the precompiled jar distribution; I will attach a minimal test case class to this bug report, from which the error messages below are derived.
GCJ can compile the test class from the .java source directly to object code without complaint, but fails with a verification error when working from .class files generated either by itself on a -C pass or from Sun's javac. (1.4.2) 3.3.4 (on Linux/x86) and 3.4.3 (on darwin-ppc) both give the same verification error; on 4.0.0 checked out from CVS (on Linux/x86) I get an additional error message about an internal compiler error in java/verify.c. >From 3.3.4: $ gcj -v -save-temps -c -o test.o *.class Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.4/specs Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.4/../../../libgcj.spec rename spec lib to liborig Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang -- prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/ include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext -- enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java- awt=xlib --enable-objc-gc i486-linux Thread model: posix gcc version 3.3.4 (Debian 1:3.3.4-9ubuntu5) /usr/lib/gcc-lib/i486-linux/3.3.4/jc1 /tmp/ccmcxg1ujx -fhash-synchronization -fno-use-divide- subroutine -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase ccmcxg1ujx -auxbase-strip test.o -g1 -version -ffilelist-file -o ccmcxg1ujx.s GNU Java version 3.3.4 (Debian 1:3.3.4-9ubuntu5) (i486-linux) compiled by GNU C version 3.3.4 (Debian 1:3.3.4-9ubuntu5). GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64576 Class path starts here: ./ /usr/share/java/libgcj-3.3.4.jar/ (system) (zip) Cleaner.java: In class `Cleaner': Cleaner.java: In method `Cleaner.doClean()': Cleaner.java:20: error: verification error at PC=23 Cleaner.java:20: error: types could not be merged With GCJ built from CVS checkout: $ gcj -v -save-temps -c -o test.o *.class Using built-in specs. Reading specs from /opt/gcj/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../libgcj.spec rename spec lib to liborig Configured with: ../gcc/configure --prefix=/opt/gcj --enable-languages=c,c++,java : (reconfigured) ../gcc/configure --prefix=/opt/gcj --enable-languages=c,c++,java Thread model: posix gcc version 4.0.0 20050108 (experimental) /opt/gcj/libexec/gcc/i686-pc-linux-gnu/4.0.0/jc1 /tmp/ccjhixvIjx -fhash-synchronization -fno-use- divide-subroutine -fuse-boehm-gc -fnon-call-exceptions -fno-omit-frame-pointer -fkeep-inline- functions -quiet -dumpbase ccjhixvIjx -mtune=pentiumpro -auxbase-strip test.o -g1 -version -ffilelist-file -o ccjhixvIjx.s GNU Java version 4.0.0 20050108 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 3.3.4 (Debian 1:3.3.4-9ubuntu5). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Class path starts here: ./ /opt/gcj/share/java/libgcj-4.0.0.jar/ (system) (zip) Cleaner.java: In class 'Cleaner': Cleaner.java: In method 'Cleaner.doClean()': Cleaner.java:20: internal compiler error: tree check: accessed elt 5 of tree_vec with 3 elts in verify_jvm_instructions, at java/verify.c:592 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. -- Summary: Java verification error: types could not be merged Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: brion at pobox dot com CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19344