-
Bug
-
Resolution: Fixed
-
Medium
-
Code Generation Tools
-
CODEGEN-11223
-
-
-
-
default
-
use --opt_level=0 or 1 instead of 2
NOTE: CODEGEN-11634 addresses another use case that below fix did not.
With --opt_level=2, the optimizer generates "internal error" for arrays of pointers similar to below example:
TP>> internal error: Bad kind: TYPE::type_pointed_to
void foo(void)
More details:
----------------
The attached file has these lines ...
static inline __erase_vector __parse_args(uint8_t* ptrInput, uint8_t* argv[]) { /* code here */ }
Build it ...
% cl2000 -@options.txt file.c "file.c", line 2639: warning #303-D: typedef name has already been declared (with same type) "file.c", line 2640: warning #303-D: typedef name has already been declared (with same type) "file.c", line 2679: warning #303-D: typedef name has already been declared (with same type) TP>> internal error: Bad kind: TYPE::type_pointed_to This is caused by a defect in the TI C/C++ Optimizer. 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
Replace that function with an extern declaration ...
extern __erase_vector __parse_args(uint8_t* ptrInput, uint8_t* argv[]);
... and it builds clean.