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: unassig...@gcc.gnu.org
        ReportedBy: ae...@gcc.gnu.org
                CC: d...@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.

Reply via email to