public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "jdh41@cantab.net" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug java/19810] New: Finally handling inconsistent when compiling to class/executable
Date: Wed, 02 Feb 2005 20:59:00 -0000	[thread overview]
Message-ID: <20050207191551.19810.jdh41@cantab.net> (raw)

>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


             reply	other threads:[~2005-02-02 20:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-02 20:59 jdh41@cantab.net [this message]
2005-02-07 19:21 ` [Bug java/19810] " tromey@gcc.gnu.org
2005-02-19  1:53 ` tromey at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050207191551.19810.jdh41@cantab.net \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=java-prs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).