gcc 2.7.2.1 optimizer bug?

Josef Wolf jw@raven.inka.de
Mon Mar 16 13:04:00 GMT 1998


> On Thu, 12 Mar 1998 14:07:26 -0800 (PST), art@acc.com (Art Berggreen) wrote:
> >>	subq.w #1,%a1
> >>	/*   ^ note the size spezifier here 16 bit !!!!!!!!!!!!!! */
> >Arithmetic operations on 68k address registers are always promoted to
> >32 bits.
> `sign extended' would be more accurate.
> According the the programmer's guide, when an address register is the
> source of a word operation, only the low 16-bits are used.  When an
> address register is the destination, the operands are sign-extended
> to 32-bits.

Wouldn't this be a bug, since I declared it with 'unsigned long *bar;' ?

BTW: It _must_ be a bug, because the program runs fine with subq.l and
crashes with subq.w ;-)



More information about the crossgcc mailing list