This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMS320C5517: The compiler seems to go wrong

Part Number: TMS320C5517

Tool/software: TI C/C++ Compiler

the oprative "+=" seems to be wrongly compiled when I define a struct variable.

typedef struct{

unsigned short a:8;

unsigned short b:8;

}AA;

volatile AA test;

When I use test.a += 1, it gets a wrong result. And I saw into assemble code, it was not right. When I do not use volatile, the compiling seems right with "+="

And when I use  test.a =  test.a + 1, it can get a right result.

Why does this happen?  If the compiler has problems, I don't know if there are other errors in my code. I can't see into all the assemble code since my C code is very large.