This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch: Sign-extension bug (?) in immed_double_const
- To: Neil Booth <NeilB at earthling dot net>
- Subject: Re: patch: Sign-extension bug (?) in immed_double_const
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 14 Sep 2000 09:26:53 -0600
- cc: gcc-patches at gcc dot gnu dot org, Geoff Keating <geoffk at cygnus dot com>
- Reply-To: law at cygnus dot com
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