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.

CGT 7.4.8 compiler crash

Hello,

we have some code which crashes with certain compiler options:
-g --optimize_with_debug=on
-O is not used

The error can be reproduced with the following code:

#include <stdlib.h>

int test(unsigned int Size, void *pData)
{
    if (Size >= 32768)
        return -1;

    free(pData);
    return 0;

OUT:
    if(pData != NULL)
        free(pData);

    return 0;
}

The Build Console shows the following:

'Building file: test.c'
'Invoking: C6000 Compiler'
"c:/ti/C6000 Code Generation Tools 7.4.8/bin/cl6x" -mv6600 --abi=eabi -g --optimize_with_debug=on --include_path="c:/ti/C6000 Code Generation Tools 7.4.8/include" --display_error_number --diag_warning=225 --gen_func_subsections=on --mem_model:data=far --preproc_with_compile --preproc_dependency="src/test.pp" --obj_directory="src" --cmd_file="./configPkg/compiler.opt"  "test.c"
"test.c", line 11: warning #179-D: label "OUT" was declared but never referenced

INTERNAL ERROR: c:\ti\C6000 Code Generation Tools 7.4.8\bin\cg6x.exe experienced a segmentation fault while
                processing function test file test.c line 8

This is a serious problem.  Please contact Customer
Support with this message and a copy of the input file

>> Compilation failure
and help us to continue to make the tools more robust.

Thanks,
Ralf

  • Thank you for submitting a test case.  I can reproduce this diagnostic.  I filed SDSCM00050657 in the SDOWP system to have this investigated.  Feel free to follow it with the SDOWP link below in my signature.

    If you remove the unused label OUT, it builds clean.  I hope this is a practical workaround for you.

    Thanks and regards,

    -George