public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/19810] New: Finally handling inconsistent when compiling to class/executable
@ 2005-02-02 20:59 jdh41@cantab.net
  2005-02-07 19:21 ` [Bug java/19810] " tromey@gcc.gnu.org
  2005-02-19  1:53 ` tromey at gcc dot gnu dot org
  0 siblings, 2 replies; 4+ messages in thread
From: jdh41@cantab.net @ 2005-02-02 20:59 UTC (permalink / raw)
  To: java-prs

>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:
jdh41@chloe:~/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)
jdh41@chloe:~/src$ gcj -C Confuse.java
jdh41@chloe:~/src$ java -v Confuse
Calling wtf(true):true
Calling wtf(false):false
jdh41@chloe:~/src$ ~/j2sdk1.4.2_06/bin/java Confuse
Calling wtf(true):true
Calling wtf(false):false
jdh41@chloe:~/src$ gcj -o confuse_me Confuse.java --main=Confuse
jdh41@chloe:~/src$ ./confuse_me 
Calling wtf(true):false
Calling wtf(false):false
jdh41@chloe:~/src$ ~/j2sdk1.4.2_06/bin/javac Confuse.java 
jdh41@chloe:~/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


^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <bug-19810-10063@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2007-01-09 20:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-02 20:59 [Bug java/19810] New: Finally handling inconsistent when compiling to class/executable jdh41@cantab.net
2005-02-07 19:21 ` [Bug java/19810] " tromey@gcc.gnu.org
2005-02-19  1:53 ` tromey at gcc dot gnu dot org
     [not found] <bug-19810-10063@http.gcc.gnu.org/bugzilla/>
2007-01-09 20:51 ` tromey at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).