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 bug using nested structs and switch case



Hi, we're having issues using TI Compiler v7.4.12 for C6670 DSP.

Looking to assembler code it seems that code sequentiality is broken, here an example:

struct->ptr->object[0].valueStored = otherstruct->ptr.ptr2.valueReceived;

switch(struct->ptr->object[0].valueStored)
{
...
}

When I use "valueReceived" inside the switch case everything works smoothly, but if I use "valueStored" the switch reads the old valueStored instead of update it with the new valueReceived (valueStored is updated after the switch case).

Assembler code shows this error clearly.

If I put the assignment inside the switch case, everything is fine, like this:

switch(struct->ptr->object[0].valueStored = otherstruct->ptr.ptr2.valueReceived)

I can send you the code piece and assembly if you need it.

Thanks, regards