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/TMS320C6672: Optimizer terminated abnormally

Part Number: TMS320C6672

Tool/software: TI C/C++ Compiler

Hi,

I get an internal compiler error while trying to compile the following code:

struct bitfield
{
    bitfield(unsigned = 0)
    {
        *((volatile unsigned*)&_raw) = *((volatile unsigned*)&_raw);
    }

    operator unsigned() const
    {
        return *((volatile unsigned*)&_raw);
    }

    unsigned _raw;
};

bitfield error_msi_not_acknowledged;

void msi_send()
{
    error_msi_not_acknowledged = bitfield(bitfield(0));
}

while using the following command line:

F:/Packages/TI_8.1.0/CodeComposerStudio/ccsv8/tools/compiler/ti-cgt-c6000_8.3.0/bin/cl6x.exe "C:\Users\[...]\Desktop\CompilerError.cpp" -O2

I have not tried version 8.3.1 of the compiler. Workaround for me was to not execute the strange sequence of constructors and cast operators. I have also found that replacing *((volatile unsigned*)&_raw) with ((volatile unsigned&)_raw) no longer produces optimizer crashes, but tends to generate infinite loops when packed into a tight loop where the boundary depends on the cast operator, but maybe my understanding of my the code is lacking there.

Regards,
Lukas

  • Lukas,

    Our compiler expert will be back in the office on Monday and will take a look at this.

    Regards,
    John
  • Thank you for reporting this problem, and submitting a concise test case.  I can reproduce the same behavior.  I filed CODEGEN-5569 in the SDOWP system to have this investigated.  You are welcome to follow it with the SDOWP link below in my signature.

    Another workaround to consider ... Lower the optimization level from -O2 to -O1.

    Thanks and regards,

    -George