This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/31169] Bootstrap comparison error at revision 122821



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]