From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18102 invoked by alias); 29 Jan 2005 00:59:29 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 17722 invoked by uid 48); 29 Jan 2005 00:59:25 -0000 Date: Sat, 29 Jan 2005 00:59:00 -0000 From: "daney at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20050129005922.19683.daney@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/19683] New: MIPS wrong-code for 64-bit multiply from java program. X-Bugzilla-Reason: CC X-SW-Source: 2005-01/txt/msg04274.txt.bz2 List-Id: The testcase that I will attach when compiled with -O3 generates incorrect results. Good results are obtained at -O0 The testcase should be compiled like this: $ mipsel-linux-gcj --main=TestMultSimple -O2 TestMultSimple.java -o TestMultSimple-O2 $ mipsel-linux-gcj --main=TestMultSimple -O0 TestMultSimple.java -o TestMultSimple-O0 When running I get this: /junk # ./TestMultSimple-O2 test10a3 off = -28800000 = 0800 soff = 1106931389806 = 2005.01.28 08:56:29.806 syscur = 1106960189806 = 2005.01.28 16:56:29.806 d = -5287802103562112000 = 7090.-33554411.-33554413 23:51:28.000 /junk # ./TestMultSimple-O0 test10a3 off = -28800000 = 0800 soff = 1106931392290 = 2005.01.28 08:56:32.290 syscur = 1106960192290 = 2005.01.28 16:56:32.290 d = 1106870400000 = 2005.01.27 16:00:00.000 The second result is correct. d should be a positive number of about the same value as syscur. When build with x86 targeted compiler the bug is not seen. gcj (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) for example gives good results. -- Summary: MIPS wrong-code for 64-bit multiply from java program. Product: gcc Version: 3.4.3 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P2 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: daney at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux GCC host triplet: i686-pc-linux GCC target triplet: mipsel-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19683