From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23354 invoked by alias); 15 Apr 2002 23:49:01 -0000 Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org Received: (qmail 23325 invoked from network); 15 Apr 2002 23:48:59 -0000 Received: from unknown (HELO nescio.wildebeest.org) (62.108.28.95) by sources.redhat.com with SMTP; 15 Apr 2002 23:48:59 -0000 Received: from elsschot.wildebeest.org ([192.168.1.26] helo=elsschot ident=mail) by nescio.wildebeest.org with esmtp (Exim 3.35 #1 (Debian)) id 16xGDI-0005BC-00 for ; Tue, 16 Apr 2002 01:48:48 +0200 Received: from mark by elsschot with local (Exim 3.35 #1 (Debian)) id 16xGDR-0003Iy-00 for ; Tue, 16 Apr 2002 01:48:57 +0200 Subject: real_zerop thinks -0 == 0 From: Mark Wielaard To: java@gcc.gnu.org Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Mon, 15 Apr 2002 18:22:00 -0000 Message-Id: <1018914537.30925.36.camel@elsschot> Mime-Version: 1.0 X-SW-Source: 2002-04/txt/msg00227.txt.bz2 Hi, The following seems to fix a couple of the remaining Mauve failures (the mauve tests are first compiled to byte-code). --- jcf-write.c 12 Mar 2002 10:33:57 -0000 1.99.2.1 +++ jcf-write.c 15 Apr 2002 23:37:46 -0000 @@ -1536,9 +1536,7 @@ { int prec = TYPE_PRECISION (type) >> 5; RESERVE(1); - if (real_zerop (exp)) - OP1 (prec == 1 ? OPCODE_fconst_0 : OPCODE_dconst_0); - else if (real_onep (exp)) + if (real_onep (exp)) OP1 (prec == 1 ? OPCODE_fconst_1 : OPCODE_dconst_1); /* FIXME Should also use fconst_2 for 2.0f. Also, should use iconst_2/ldc followed by i2f/i2d This isn't a real solution, but I don't know how to correctly test for positive zero and I really must get some sleep now. Maybe someone more familiar with this code can suggest the proper solution. The example code to try is: public class Z { public static void main(String[] args) { System.out.println(-0.0f); } } Compile with gcj -C and run with gij. Output should be -0.0. Good night, Mark