public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "brian_252 at yahoo dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug java/18430] New: VerifyError, incompatible type on stack Date: Thu, 11 Nov 2004 16:32:00 -0000 [thread overview] Message-ID: <20041111163224.18430.brian_252@yahoo.com> (raw) I'm trying to compile Ant and i ran into and error. I simplified the code as much as possible while still producing the error. It doesn't matter if you use gcj or Sun's javac (1.3.1) to compile. And Sun's java will run the code without problem. Here's the code: interface fnm { int getInt(); } class im1 implements fnm { public int getInt() { return 1; } } class im2 implements fnm { public int getInt() { return 2; } } public class test { public static void main( String[] Args ) { test T = new test(); T.exec(); } public void exec() { fnm myMapper = new im1(); if (Math.random() == 1.0d) { myMapper = new im2(); } System.out.println( myMapper.getClass().getName() ); // im1 // System.out.println( myMapper.getInt() ); // works // this.select( myMapper ); // fails } public void select( fnm Mapper ) { System.out.println( Mapper.getInt() ); } } Here's the stack trace: Exception in thread "main" java.lang.VerifyError: verification failed at PC 26 in test:exec(()V): incompatible type on stack at _Jv_BytecodeVerifier.verify_fail(byte, int) (/usr/lib/libgcj.so.4.0.0) at _Jv_BytecodeVerifier.verify_instructions_0() (/usr/lib/libgcj.so.4.0.0) at _Jv_VerifyMethod(_Jv_InterpMethod) (/usr/lib/libgcj.so.4.0.0) at _Jv_PrepareClass(java.lang.Class) (/usr/lib/libgcj.so.4.0.0) at java.lang.ClassLoader.linkClass0(java.lang.Class) (/usr/lib/libgcj.so.4.0.0) at java.lang.ClassLoader.resolveClass0(java.lang.Class) (/usr/lib/libgcj.so.4.0.0) at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.4.0.0) at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.4.0.0) at java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.4.0.0) at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.4.0.0) at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.4.0.0) at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.4.0.0) at __libc_start_main (/lib/libc-2.3.2.so) -- Summary: VerifyError, incompatible type on stack Product: gcc Version: 3.3.5 Status: UNCONFIRMED Severity: normal Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: brian_252 at yahoo dot com CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18430
next reply other threads:[~2004-11-11 16:32 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-11-11 16:32 brian_252 at yahoo dot com [this message] 2004-11-11 16:34 ` [Bug libgcj/18430] " pinskia at gcc dot gnu dot org 2004-11-11 16:36 ` brian_252 at yahoo dot com 2004-11-11 16:38 ` brian_252 at yahoo dot com 2004-11-11 16:40 ` 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=20041111163224.18430.brian_252@yahoo.com \ --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).