This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/18665] [3.4/4.0 Regression] -ftrapv borks up simple integer arithmetic
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Dec 2004 10:11:37 -0000
- Subject: [Bug target/18665] [3.4/4.0 Regression] -ftrapv borks up simple integer arithmetic
- References: <20041124222749.18665.skunk@iskunk.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2004-12-10 10:11 -------
OK, I understand what happens: the 5 symbols __absvdi2, __addvdi3, __subvdi3,
__mulvdi3 and __negvdi2 are not #defined in libgcc2.h, hence not tweaked based
on the word size. They are, therefore, double-word symbols everywhere, which
doesn't work on 64-bit targets.
The fix is straightforward, however there is a hitch: on 64-bit targets, libgcc
will contain 5 new symbols (__absvti2, __addvti3, __mulvti3, __negvti2,
__subvti3) and will not contain (__absvsi2, __addvsi3, __mulvsi3, __negvsi2,
__subvsi3) anymore. While the former is OK, the latter is probably not so we
might need to provide stubs that will redirect them to the equivalent mode-sized
routines for backwards compatibility.
Richard, does that sound plausible?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18665