java/6388: Integer.MIN_VALUE == 0x80000000 optimized to false on powerpc
mark@klomp.org
mark@klomp.org
Sun Apr 21 02:16:00 GMT 2002
>Number: 6388
>Category: java
>Synopsis: Integer.MIN_VALUE == 0x80000000 optimized to false on powerpc
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Apr 21 02:06:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: mark@klomp.org
>Release: gcj 3.1
>Organization:
>Environment:
>Description:
The following program (compiled to byte or native code):
public class IT
{
public static void main(String[] args)
{
System.out.println(Integer.MIN_VALUE);
System.out.println(0x80000000);
System.out.println(Integer.MIN_VALUE == 0x80000000);
System.out.println(0x80000000 == 0x80000000);
}
}
Should produce the following output (as it does on i686):
-2147483648
-2147483648
true
true
But on powerpc it produces:
-2147483648
-2147483648
false
true
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list