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.

ac2000.exe experienced a segmentation fault

Genius 5910 points
Other Parts Discussed in Thread: TMS320F280049

Tool/software: TI C/C++ Compiler

We tried out the new compiler without any success. 

Information: CCS V10.0.0.00010

Compiler: V20.2.0.LTS

MCU: TMS320F280049

code example:

typedef int(*testFuncType)(int value);

struct NotWorking
{
    testFuncType    Execfunction;
};

int TestFunc(int a)
{
    return a;
}

int main(void)
{
    int b;

    struct NotWorking NotWorkingTest;
    testFuncType WorkingTest;


    NotWorkingTest.Execfunction = TestFunc;
    b = NotWorkingTest.Execfunction(5); // (Comment this line to compile with success)

    WorkingTest = TestFunc;
    b = WorkingTest(5);

    return b;
}

Output:

C:\\ti\\ccs1000\\ccs\\utils\\bin\\gmake" -k -j 12 all -O
 
Building file: "../main.c"
Invoking: C2000 Compiler
"C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-c2000_20.2.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 --include_path="C:/Users/verhoef/workspace_v10/CompilerErrorSegmentation" --include_path="C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-c2000_20.2.0.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="main.d_raw"  "../main.c"
 
>> Compilation failure
subdir_rules.mk:9: recipe for target 'main.obj' failed
 
INTERNAL ERROR: C:\ti\ccs1000\ccs\tools\compiler\ti-cgt-c2000_20.2.0.LTS\bin\ac2000.exe experienced a segmentation fault
                  while processing function (unknown or file scope) file (unknown) line 0
 
This is caused by a defect in the TI C/C++ Parser.
TI Customer Support may be able to suggest a workaround to avoid this.
 
Upgrading to the newest version of the compiler may fix this problem.
 
Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler".  See the link titled
"Submitting an issue".
 
We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.
Include the .pp file created by option --preproc_with_comment
 
gmake: *** [main.obj] Error 1
gmake: Target 'all' not remade because of errors.