public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/31477] New: [libgcc] miscompiled trapping arithmetic routines
@ 2007-04-04 22:24 rth at gcc dot gnu dot org
2007-04-04 23:08 ` [Bug other/31477] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: rth at gcc dot gnu dot org @ 2007-04-04 22:24 UTC (permalink / raw)
To: gcc-bugs
At least some of the trapping arithmetic routines (__absvsi2, etc), are
being compiled *without* the abort that would, in general, be required.
These routines are falling foul of the signed-arithmetic-doesn't-overflow
coding trap. We need to either compile them with -fwrapv, or rewrite
them to use unsigned arithmetic.
Further, it would be A Good Idea if these routines were actually tested...
--
Summary: [libgcc] miscompiled trapping arithmetic routines
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31477
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug other/31477] [libgcc] miscompiled trapping arithmetic routines
2007-04-04 22:24 [Bug other/31477] New: [libgcc] miscompiled trapping arithmetic routines rth at gcc dot gnu dot org
@ 2007-04-04 23:08 ` pinskia at gcc dot gnu dot org
2007-04-09 17:45 ` rguenth at gcc dot gnu dot org
2010-05-22 17:29 ` jsm28 at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-04 23:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-04-05 00:08 -------
An even better idea is to have them being called with simple programs :).
See PR 19020 for that issue.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31477
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug other/31477] [libgcc] miscompiled trapping arithmetic routines
2007-04-04 22:24 [Bug other/31477] New: [libgcc] miscompiled trapping arithmetic routines rth at gcc dot gnu dot org
2007-04-04 23:08 ` [Bug other/31477] " pinskia at gcc dot gnu dot org
@ 2007-04-09 17:45 ` rguenth at gcc dot gnu dot org
2010-05-22 17:29 ` jsm28 at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-04-09 17:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2007-04-09 18:45 -------
comment #5 in PR19020 mentions several reasons why -ftrapv doesn't really work
right now. I'd be in favor of removing it rather than trying to fix it...
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-04-09 18:45:22
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31477
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug other/31477] [libgcc] miscompiled trapping arithmetic routines
2007-04-04 22:24 [Bug other/31477] New: [libgcc] miscompiled trapping arithmetic routines rth at gcc dot gnu dot org
2007-04-04 23:08 ` [Bug other/31477] " pinskia at gcc dot gnu dot org
2007-04-09 17:45 ` rguenth at gcc dot gnu dot org
@ 2010-05-22 17:29 ` jsm28 at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2010-05-22 17:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jsm28 at gcc dot gnu dot org 2010-05-22 17:29 -------
I believe I fixed this with:
r132815 | jsm28 | 2008-03-02 13:11:19 +0000 (Sun, 02 Mar 2008) | 4 lines
* libgcc2.c (__addvSI3, __addvsi3, __addvDI3, __subvSI3,
__subvsi3, __subvDI3, __negvSI2, __negvsi2, __negvDI2, __absvSI2,
__absvsi2, __absvDI2): Use unsigned arithmetic.
(whether or not -ftrapv actually works properly).
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31477
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-05-22 17:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-04 22:24 [Bug other/31477] New: [libgcc] miscompiled trapping arithmetic routines rth at gcc dot gnu dot org
2007-04-04 23:08 ` [Bug other/31477] " pinskia at gcc dot gnu dot org
2007-04-09 17:45 ` rguenth at gcc dot gnu dot org
2010-05-22 17:29 ` jsm28 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).