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