public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/23485] New: [ia64]: Integer dvide by zero doesn't raise a signal
@ 2005-08-19 18:20 hjl at lucon dot org
2005-08-19 18:22 ` [Bug target/23485] " hjl at lucon dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: hjl at lucon dot org @ 2005-08-19 18:20 UTC (permalink / raw)
To: gcc-bugs
[hjl@gnu-4 zero]$ cat x.c
int
foo (int y, int x)
{
return y/x;
}
[hjl@gnu-4 zero]$ cat y.c
#include <stdio.h>
extern int foo (int, int);
int
main ()
{
printf ("(10/0) = %d\n", foo (10, 0));
return 0;
}
[hjl@gnu-4 zero]$ gcc x.c y.c
[hjl@gnu-4 zero]$ ./a.out
(10/0) = 0
It happens on gcc 3.4/4.0/4.1.
--
Summary: [ia64]: Integer dvide by zero doesn't raise a signal
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl at lucon dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: ia64-unknown-linux-gnu
GCC host triplet: ia64-unknown-linux-gnu
GCC target triplet: ia64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23485] [ia64]: Integer dvide by zero doesn't raise a signal
2005-08-19 18:20 [Bug target/23485] New: [ia64]: Integer dvide by zero doesn't raise a signal hjl at lucon dot org
@ 2005-08-19 18:22 ` hjl at lucon dot org
2005-08-19 18:32 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl at lucon dot org @ 2005-08-19 18:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hjl at lucon dot org 2005-08-19 18:21 -------
A patch is posted at
http://gcc.gnu.org/ml/gcc-patches/2005-08/msg01172.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23485] [ia64]: Integer dvide by zero doesn't raise a signal
2005-08-19 18:20 [Bug target/23485] New: [ia64]: Integer dvide by zero doesn't raise a signal hjl at lucon dot org
2005-08-19 18:22 ` [Bug target/23485] " hjl at lucon dot org
@ 2005-08-19 18:32 ` pinskia at gcc dot gnu dot org
2005-08-20 15:27 ` hjl at lucon dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-19 18:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-19 18:26 -------
I don't see why this is a bug really as on some targets (PPC) divide by zero does not raise any thing and
the result is undefined.
You might want to test your patch's performance as it could cause a lot of problems if someone does a
loop with divides in them and it checks all the time for divide by zero which an extra branch every time
which is bad.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23485] [ia64]: Integer dvide by zero doesn't raise a signal
2005-08-19 18:20 [Bug target/23485] New: [ia64]: Integer dvide by zero doesn't raise a signal hjl at lucon dot org
2005-08-19 18:22 ` [Bug target/23485] " hjl at lucon dot org
2005-08-19 18:32 ` pinskia at gcc dot gnu dot org
@ 2005-08-20 15:27 ` hjl at lucon dot org
2005-08-20 18:34 ` hjl at lucon dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl at lucon dot org @ 2005-08-20 15:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hjl at lucon dot org 2005-08-20 15:18 -------
We also need to check divide-by-zero for -minline-int-divide-min-latency and
-minline-int-divide-max-throughput.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23485] [ia64]: Integer dvide by zero doesn't raise a signal
2005-08-19 18:20 [Bug target/23485] New: [ia64]: Integer dvide by zero doesn't raise a signal hjl at lucon dot org
` (2 preceding siblings ...)
2005-08-20 15:27 ` hjl at lucon dot org
@ 2005-08-20 18:34 ` hjl at lucon dot org
2005-08-21 0:00 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl at lucon dot org @ 2005-08-20 18:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hjl at lucon dot org 2005-08-20 18:33 -------
A patch for inlined calls is posted at
http://gcc.gnu.org/ml/gcc-patches/2005-08/msg01223.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23485] [ia64]: Integer dvide by zero doesn't raise a signal
2005-08-19 18:20 [Bug target/23485] New: [ia64]: Integer dvide by zero doesn't raise a signal hjl at lucon dot org
` (3 preceding siblings ...)
2005-08-20 18:34 ` hjl at lucon dot org
@ 2005-08-21 0:00 ` cvs-commit at gcc dot gnu dot org
2005-08-22 3:08 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-21 0:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-08-20 23:55 -------
Subject: Bug 23485
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: hjl@gcc.gnu.org 2005-08-20 23:55:07
Modified files:
gcc : ChangeLog
gcc/config/ia64: lib1funcs.asm
Log message:
2005-08-20 H.J. Lu <hongjiu.lu@intel.com>
PR target/23485
* config/ia64/lib1funcs.asm (__divdi3): Check divide by zero.
(__moddi3): Likewise.
(__udivdi3): Likewise.
(__umoddi3): Likewise.
(__divsi3): Likewise.
(__modsi3): Likewise.
(__udivsi3): Likewise.
(__umodsi3): Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9790&r2=2.9791
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/lib1funcs.asm.diff?cvsroot=gcc&r1=1.17&r2=1.18
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23485] [ia64]: Integer dvide by zero doesn't raise a signal
2005-08-19 18:20 [Bug target/23485] New: [ia64]: Integer dvide by zero doesn't raise a signal hjl at lucon dot org
` (4 preceding siblings ...)
2005-08-21 0:00 ` cvs-commit at gcc dot gnu dot org
@ 2005-08-22 3:08 ` cvs-commit at gcc dot gnu dot org
2005-08-22 3:45 ` hjl at lucon dot org
2005-08-23 1:50 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-22 3:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-08-22 03:07 -------
Subject: Bug 23485
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: rth@gcc.gnu.org 2005-08-22 03:07:44
Modified files:
gcc : ChangeLog
gcc/config/ia64: ia64.md
Log message:
PR target/23485
* config/ia64/ia64.md (divsi3): Check divide by zero.
(udivsi3): Likewise.
(divdi3): Likewise.
(udivdi3): Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9795&r2=2.9796
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/ia64.md.diff?cvsroot=gcc&r1=1.158&r2=1.159
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23485] [ia64]: Integer dvide by zero doesn't raise a signal
2005-08-19 18:20 [Bug target/23485] New: [ia64]: Integer dvide by zero doesn't raise a signal hjl at lucon dot org
` (5 preceding siblings ...)
2005-08-22 3:08 ` cvs-commit at gcc dot gnu dot org
@ 2005-08-22 3:45 ` hjl at lucon dot org
2005-08-23 1:50 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: hjl at lucon dot org @ 2005-08-22 3:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hjl at lucon dot org 2005-08-22 03:44 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23485] [ia64]: Integer dvide by zero doesn't raise a signal
2005-08-19 18:20 [Bug target/23485] New: [ia64]: Integer dvide by zero doesn't raise a signal hjl at lucon dot org
` (6 preceding siblings ...)
2005-08-22 3:45 ` hjl at lucon dot org
@ 2005-08-23 1:50 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-23 1:50 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23485
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-08-23 1:49 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-19 18:20 [Bug target/23485] New: [ia64]: Integer dvide by zero doesn't raise a signal hjl at lucon dot org
2005-08-19 18:22 ` [Bug target/23485] " hjl at lucon dot org
2005-08-19 18:32 ` pinskia at gcc dot gnu dot org
2005-08-20 15:27 ` hjl at lucon dot org
2005-08-20 18:34 ` hjl at lucon dot org
2005-08-21 0:00 ` cvs-commit at gcc dot gnu dot org
2005-08-22 3:08 ` cvs-commit at gcc dot gnu dot org
2005-08-22 3:45 ` hjl at lucon dot org
2005-08-23 1:50 ` pinskia at gcc dot gnu dot 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).