[Bug target/45800] New: [M32C] compile error on increment volatile long var

aesok at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Sep 26 18:31:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45800

           Summary: [M32C] compile error on increment volatile long var
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: aesok@gcc.gnu.org
                CC: dj@redhat.com
            Target: M32C


Hi!

The following code snippet leads to compile error

volatile long boo = 0;

void
foo (void)
{
  boo++;
}



[]$ /opt/m32c-elf/bin/m32c-elf-gcc -O1   -c test.c -o test.o
unconvertible operand - `Sms'(subreg:HI (mem/v/c/i:SI (symbol_ref:HI ("boo")
[flags 0x2] <var_decl 0x7faa9a811000 boo>) [0 boo+0 S4 A8]) 0)
unconvertible operand - `Sms'(subreg:HI (mem/v/c/i:SI (symbol_ref:HI ("boo")
[flags 0x2] <var_decl 0x7faa9a811000 boo>) [0 boo+0 S4 A8]) 2)
/tmp/ccx0sAA0.s: Assembler messages:
/tmp/ccx0sAA0.s:6: Error: Invalid literal `add.w #0x1,[-.Sms]'
/tmp/ccx0sAA0.s:7: Error: Invalid literal `adcf.w [-.Sms]'

Anatoly.



More information about the Gcc-bugs mailing list