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 middle-end/35885] unsigned long long and while loop evaluation regression?



------- Comment #5 from wilson at gcc dot gnu dot org  2008-04-15 00:25 -------
Gcc-2.5.8 uses the code I suggested was correct.  gcc-2.6.3 does not.  The
ChangeLog entry is

Fri Aug  5 12:29:42 1994  Jim Wilson  (wilson@cygnus.com)

        * expmed.c (expand_mult): Accept DImode for synth_mult only if
        CONST_DOUBLE_HIGH is zero.  Reject negative values for synth_mult
        if the mode is larger than HOST_BITS_PER_INT.  Don't do the
        negate_variant if the mode is larger than HOST_BITS_PER_INT.

So it seems that we used to allow any constant that would fit in a signed HWI,
then I found a bug with negative values so I changed it to any constant that
would fit in an unsigned HWI.  Now we found another bug with a constant that
doesn't fit in a signed HWI but does fit in an unsigned HWI.

So now the apparent solution is to only accept positive values that fit in a
signed HWI.  But of course such values should never be found in a CONST_DOUBLE
anyways.  If they fit in a signed HWI they would have been emitted as a
CONST_INT in the first place.  I think we should just drop all of this
CONST_DOUBLE nonsense.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35885


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