public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tromey at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcj/23182] instanceof sometimes fails if compiled with -findirect-dispatch Date: Tue, 23 Aug 2005 20:48:00 -0000 [thread overview] Message-ID: <20050823195828.22614.qmail@sourceware.org> (raw) In-Reply-To: <20050801155040.23182.hannes@helma.at> ------- Additional Comments From tromey at gcc dot gnu dot org 2005-08-23 19:58 ------- Reduced test case. Compile to .class, then compile with -findirect-dispatch. Interpreting works fine. public class pr23182 { static class Wrapper { Object w; Object get() { return w; } Wrapper(Object x) { w = x; } } static Wrapper instance = new Wrapper(null); public static String toString(Object val) { for (;;) { if (val == null) return "null"; if (val instanceof Wrapper) { val = ((Wrapper) val).get(); if (val != instance && val instanceof Wrapper) throw new RuntimeException("bob"); continue; } return val.toString(); } } public static void main(String[] args) { System.out.println(toString(null)); System.out.println(toString("maude")); System.out.println(toString(new Wrapper("liver"))); } } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23182
next prev parent reply other threads:[~2005-08-23 19:58 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-08-01 15:50 [Bug libgcj/23182] New: " hannes at helma dot at 2005-08-23 16:05 ` [Bug libgcj/23182] " tromey at gcc dot gnu dot org 2005-08-23 20:48 ` tromey at gcc dot gnu dot org [this message] 2005-08-30 21:02 ` fitzsim at redhat dot com 2005-09-05 16:06 ` aph at gcc dot gnu dot org 2005-09-05 16:15 ` tromey at gcc dot gnu dot org 2005-09-05 17:40 ` fitzsim at redhat dot com 2005-09-05 18:55 ` fitzsim at redhat dot com 2005-09-08 14:09 ` aph at gcc dot gnu dot org 2005-09-09 0:34 ` green at redhat dot com 2005-09-09 16:04 ` cvs-commit at gcc dot gnu dot org 2005-09-22 17:43 ` mckinlay at redhat dot com 2005-09-30 15:54 ` cvs-commit at gcc dot gnu dot org 2005-09-30 16:17 ` pinskia 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=20050823195828.22614.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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: linkBe 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).