This is the mail archive of the gcc-patches@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]

Re: patch: Sign-extension bug (?) in immed_double_const


  In message <20000830230940.A8409@daikokuya.demon.co.uk>you write:
  > If it is a good fix, I'll add something to the comment, too.
  > 
  > Neil.
  > 
  > 	* varasm.c (immed_double_const):  Sign extend constants that
  > 	would be signed in their mode.
This can't be correct.

Consider :

BITS_PER_WORD 32
HOST_BITS_PER_WIDE_INT 32
width 64
i0 0x80180481
i1 0

Your change will turn that into

i0 0xffffffff
i1 0x0

Which can't be correct.

The "|| i1 == 0" clause seems totally bogus to me.  I have no idea what you
were trying to accomplish with that change, but it can't be right as written.

jeff


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