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: "jv244 at cam dot ac dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jan 2007 07:14:44 -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 #5 from jv244 at cam dot ac dot uk 2007-01-17 07:14 -------
(In reply to comment #0)
> The program below shows (at all the optimization levels) a miscompilation of
> the remainder expression that causes INT_MIN % -1 to cause a SIGFPE on CPUs of
> the i386 family.
notice that this is language dependent. I.e. in Fortran the equivalent of the
above 'INT_MIN % -1' is undefined. So, whatever the fix for C and friends, it
should not slow down Fortran programs using MOD.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30484