Egcs 1.1 produces incorrect ColdFire code

Jeffrey A Law law@cygnus.com
Sat Oct 31 01:24:00 GMT 1998


  In message <35FE7D3D.E38EC066@email.sps.mot.com>you write:
  > Hey all, I've configured Egcs 1.1b with Binutils 2.9.1 for m68k-coff.
  > Here is a simple program that illustrates the incorrect code:
  > 
  > typedef struct
  > {
  >     char spacing[0xAAAA]; /* value which breaks 16-bit displacement */
  >     char tryme;
  > } silly;
  > 
  > void
  > main (void)
  > {
  >     silly *sill = 0;
  > 
  >     sill->tryme = 0xABCD;
  > }
  > 
  > When compiling with Egcs 1.1b, I obtain the following:
This has been fixed for the upcoming egcs-1.1.1 release:

main:
        link.w %a6,#-4
        jsr __main
        clr.l -4(%a6)
        move.l -4(%a6),%a0
        move.l #43690,%d0
        moveq.l #-51,%d1
        move.b %d1,(%a0,%d0.l)
.L1:
        unlk %a6
        rts



More information about the Gcc-bugs mailing list