This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/31169] Bootstrap comparison error at revision 122821
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Mar 2007 09:47:27 -0000
- Subject: [Bug tree-optimization/31169] Bootstrap comparison error at revision 122821
- References: <bug-31169-276@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #39 from rguenth at gcc dot gnu dot org 2007-03-30 10:47 -------
Created an attachment (id=13300)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13300&action=view)
patch
The problem is that we in rshift_double() do
if (SHIFT_COUNT_TRUNCATED)
count %= prec;
which for a count == 32 yields count == 0 and a wrong value (even if we special
case the value of 32 below as it is undefined by the standard).
I don't see why we should care about SHIFT_COUNT_TRUNCATED during folding of
constants at all, in fact, it looks completely bogus.
I'd appreciate if you could test this patch for any side-effects (otherwise
it looks obvious).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31169