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]

Re: cc1 chokes on x86


"Kevin P. Neal" <kpneal@pobox.com> writes:

> (insn 10 8 11 (set (reg:QI 22)
>         (plus:QI (const_int 48 [0x30])
>             (const_int -64 [0xffffffc0]))) -1 (nil)
>     (nil))

I reproduced this with various gcc versions, including the one
shipped with Red Hat Linux 6.2.

> Is gcc sign extending 0xf0 when it shouldn't be?

No, the problem is that it's not properly folding the constants.

The current development compiler builds your code OK, so the problem
seems to be fixed.

You might try, as a workaround, switching on optimisation, with -O1 or
-O2.  GCC should then fold the constants properly.  This worked for me.
-- 
- Geoffrey Keating <geoffk@cygnus.com>

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