>From this code fragment: class Confuse {
public static void main (String[] bob) { boolean jim; jim=wtf(true); System.out.print("Calling wtf(true):"); System.out.println(jim); jim=wtf(false); System.out.print("Calling wtf(false):"); System.out.println(jim); } static boolean wtf(boolean jam) { while (jam) { try { return true; } finally { break; } } return false; } } Session: [EMAIL PROTECTED]:~/src$ gcj -v Using built-in specs. Reading specs from /home/jdh41/gcc/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../libgcj.spec rename spec lib to liborig Configured with: ../configure --enable-languages=java --disable-checking --disable-static --enable-java-awt=gtk --with-system-zlib --prefix=/home/jdh41/gcc Thread model: posix gcc version 4.0.0 20050129 (experimental) [EMAIL PROTECTED]:~/src$ gcj -C Confuse.java [EMAIL PROTECTED]:~/src$ java -v Confuse Calling wtf(true):true Calling wtf(false):false [EMAIL PROTECTED]:~/src$ ~/j2sdk1.4.2_06/bin/java Confuse Calling wtf(true):true Calling wtf(false):false [EMAIL PROTECTED]:~/src$ gcj -o confuse_me Confuse.java --main=Confuse [EMAIL PROTECTED]:~/src$ ./confuse_me Calling wtf(true):false Calling wtf(false):false [EMAIL PROTECTED]:~/src$ ~/j2sdk1.4.2_06/bin/javac Confuse.java [EMAIL PROTECTED]:~/src$ ~/j2sdk1.4.2_06/bin/java Confuse Calling wtf(true):false Calling wtf(false):false As you can see the compile to class files seems to be wrong, and further the compiler and not the VM. -- Summary: Finally handling inconsistent when compiling to class/executable Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jdh41 at cantab dot net CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org GCC build triplet: i486-linux GCC host triplet: i486-linux GCC target triplet: i486-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19810