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]
Other format: [Raw text]

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


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.


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