Other Parts Discussed in Thread: C2000WARE
Tool/software: TI C/C++ Compiler
The attached project has a simple main that causes a segmentation fault of compiler.
I think that the issue is related to any use of an array of size zero inside of an structure.
Code is the following:
void donothing(int* v) { } template <int sz> struct Myarray { int v[sz]; void func() { donothing(v); } }; int main() { Myarray<0> k; k.func(); }
And the error output is:
**** Build of configuration Debug for project SFault ****
"C:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 8 all -O
'Building file: ../main.cpp'
'Invoking: C2000 Compiler'
"C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.6.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --include_path="C:/Users/jbm/workspace_c2000ware/SFault" --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.6.LTS/include" --advice:performance=all -g --preproc_only --preproc_with_comment --preproc_with_compile --preproc_with_line --diag_warning=225 --diag_wrap=off --display_error_number "../main.cpp"
>> Compilation failure
subdir_rules.mk:9: recipe for target 'main.obj' failed
INTERNAL ERROR: C:\ti\ccsv7\tools\compiler\ti-cgt-c2000_16.9.6.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, reproducable
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.
**** Build Finished ****
Any workarround for this issue would be very appreciated, regards.