public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Todd Stock <toddastock@yahoo.com> To: tromey@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: libgcj/5670: verify.cc not properly merging states Date: Thu, 14 Feb 2002 10:46:00 -0000 [thread overview] Message-ID: <20020214184602.12713.qmail@sources.redhat.com> (raw) The following reply was made to PR libgcj/5670; it has been noted by GNATS. From: Todd Stock <toddastock@yahoo.com> To: tromey@gcc.gnu.org Cc: gcc-gnats@gcc.gnu.org Subject: Re: libgcj/5670: verify.cc not properly merging states Date: Thu, 14 Feb 2002 10:38:10 -0800 As an extension to this I have another one. Is the bug the same one you mention as finding and needing fixing? I don't think this is the correct patch for the problem. I am trying to reproduce a third problem that also appears to show the same incomplete type problem. -Todd The patch to fix this: + else if (source->isInterface ()) + { + for (int i = 0; i < target->interface_count; ++i) + { + // We use a recursive call because we also need to + // check superinterfaces. + if (is_assignable_from_slow (target->interfaces[i], source)) + return true; + } + target = target->getSuperclass (); + if (target == NULL) + return true; *^^^^^^^^^^^^^^^^^^^^^^^^^ return true instead of false. + } The code that produces the bug: import java.io.*; import java.util.*; public class Test2 { Vector v = new Vector( ); public void addBuildListener( TestListener l ) { v.addElement( l ); } } import java.io.*; import java.util.*; public class Test { Object x = null; int y = 0; public static void main (String[] args) { Test t = new Test( ); try { t.doit( ); } catch( Exception e ) { } } private void doit( ) throws Exception { final Test2 t = new Test2(); addListener(t); } protected void addListener( Test2 t ) { t.addBuildListener(doitSub()); } private TestLogger testE () throws IOException { return new TestLoggerDefault(); } private TestLogger doitSub () { TestLogger logger = null; if( x != null ) { try { logger = testE(); } catch( IOException e ) { throw new RuntimeException( ); } catch( Exception e ) { throw new RuntimeException( ); } } else { logger = new TestLoggerDefault( ); } logger.print(y); return logger; } } public interface TestListener { } public class TestLoggerDefault implements TestLogger { public void print ( int y ) { } } public interface TestLogger extends TestListener { void print ( int y ); } _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
next reply other threads:[~2002-02-14 18:46 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-02-14 10:46 Todd Stock [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-02-14 17:56 Tom Tromey 2002-02-14 9:52 tromey 2002-02-12 11:06 Todd Stock 2002-02-12 10:46 Tom Tromey 2002-02-12 10:16 toddastock
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=20020214184602.12713.qmail@sources.redhat.com \ --to=toddastock@yahoo.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=tromey@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).