From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9167 invoked by alias); 19 Apr 2005 22:30:36 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 9147 invoked by uid 48); 19 Apr 2005 22:30:35 -0000 Date: Tue, 19 Apr 2005 22:30:00 -0000 From: "mark at gcc dot gnu dot org" To: java-prs@gcc.gnu.org Message-ID: <20050419223032.21115.mark@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug java/21115] New: false boolean argument passed from pre-compiled to interpreted method is true X-Bugzilla-Reason: CC X-SW-Source: 2005-q2/txt/msg00194.txt.bz2 List-Id: This is reduced from the eclipse problem I was seeing. Compile the following Test.java with gcj --main=Test Test.java public abstract class Test { public static void main(String[] args) throws Exception { Class c = Class.forName("Invoke"); Object o = c.newInstance(); Test t = (Test) o; t.test("FALSE", false); t.test("TRUE", true); } public abstract boolean test(String s, boolean b); } Compile the Invoke.java class with gcj -C: public class Invoke extends Test { public boolean test(String s, boolean b) { if (b) System.out.println(s + ": TRUE!"); else System.out.println(s + ": FALSE!"); return b; } } Then run the expected output is: FALSE: FALSE! TRUE: TRUE! But when running ./a.out you will get: FALSE: TRUE! TRUE: TRUE! Running this completely interpreted (gcj -C Test.java; gij Test) produces the correct output. It also works correctly on powerpc-unknown-linux-gnu (either partly pre-compiled or fully interpreted). -- Summary: false boolean argument passed from pre-compiled to interpreted method is true Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mark at gcc dot gnu dot org CC: aph at redhat dot com,gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org,tromey at redhat dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21115