public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/29511]  New: 0x80000000/-1 causes FPE on Intel/AMD
@ 2006-10-19  8:02 Eric dot Deplagne at nerim dot net
  2006-10-19  8:39 ` [Bug c/29511] " schwab at suse dot de
  2006-10-19  8:58 ` Eric dot Deplagne at nerim dot net
  0 siblings, 2 replies; 4+ messages in thread
From: Eric dot Deplagne at nerim dot net @ 2006-10-19  8:02 UTC (permalink / raw)
  To: gcc-bugs

The division of 0x80000000 by -1 gives FPE on both Intel and AMD Processors...

I have checked that with the following simple program on both Fedora core 3's
GCC 3.4.4 and debian sarge's gcc-3.3.5...

I also had someone check it with gcc 4.1.2 and FreeBSD too...

int divide(int a,int b)
{
  return a/b;
}

int main(void)
{
  return divide(0x80000000,-1);
}

and what I get is:

./test
Floating point exception

And GDB says "Program received signal SIGFPE, Arithmetic exception."


-- 
           Summary: 0x80000000/-1 causes FPE on Intel/AMD
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Eric dot Deplagne at nerim dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29511


^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <bug-29511-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2021-08-22 21:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-19  8:02 [Bug c/29511] New: 0x80000000/-1 causes FPE on Intel/AMD Eric dot Deplagne at nerim dot net
2006-10-19  8:39 ` [Bug c/29511] " schwab at suse dot de
2006-10-19  8:58 ` Eric dot Deplagne at nerim dot net
     [not found] <bug-29511-4@http.gcc.gnu.org/bugzilla/>
2021-08-22 21:56 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).