-
Bug
-
Resolution: Fixed
-
Medium
-
Code Generation Tools
-
CODEGEN-7588
-
-
-
default
-
Don't put a function pointer into a struct in CLA code.
-
Use the attached files. The file try1.cla contains these lines ...
struct TestStruct { void (*FunPtr)(void); }; /* Many lines later, inside a background task function */ Test.FunPtr();
Build it ...
% cl2000 -@options.txt try1.cla INTERNAL ERROR: accla 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 >> Compilation failure
In the subset of C supported by the CLA compiler, functions pointers are not supported. Neither are functions calls from background tasks. Even so, the compiler should emit diagnostics and complete normal execution.