This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/30484] Miscompilation of remainder expressions on CPUs of the i386 family
- From: "vincent at vinc17 dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jan 2007 22:03:59 -0000
- Subject: [Bug target/30484] Miscompilation of remainder expressions on CPUs of the i386 family
- References: <bug-30484-1710@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from vincent at vinc17 dot org 2007-01-16 22:03 -------
Is this specific to x86? On PowerPC (gcc 4.0.1 from Mac OS X), I get:
-2147483648 % -1 -> -2147483648
Ditto with:
#include <limits.h>
#include <stdio.h>
int main (void)
{
volatile int i = INT_MIN, j = -1;
printf ("%d\n", i % j);
return 0;
}
--
vincent at vinc17 dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vincent at vinc17 dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30484