-
Bug
-
Resolution: Fixed
-
Medium
-
Code Generation Tools
-
CODEGEN-11206
-
-
-
default
The attached file has these lines ...
#define offsetof(type, member) ((unsigned long)&(((type *)0)->member)) #define container_of(ptr, type, member) \ ((type *)((unsigned long)(ptr)-offsetof(type, member))) struct s { int a, b, c; }; int foo(int *pb) { return container_of(pb, struct s, b)->c; }
Build it with optimization ...
cl2000 -o3 file.c >>>> Optimizer terminated abnormally >>>> in function _foo() >>>> in file "file.c" 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
All levels of optimization have the same result.