michael.liu

Data is not put in expected section when optimization level is O3 with global optimization

Discussion created by michael.liu Employee on Dec 14, 2006
Latest reply on Dec 15, 2006 by michael.liu
I'm using CW3.0 Beta, and found that when optimization level is O3 with global optimization the data is not put in expected section or unexpected data is put in the section. I'm using such directive as .rename "*starcore_main.eln",".data",".cc_m3_data" in the lcf file.  I found in the .map file that the file name in which the data is declared is not correct.  For example, an array is declared in file1.c with int a[100], and is declared in file2.c as 'extern int a[]', in lcf file there is .rename "*file1.eln",".data",".cc_m3_data" ,  and finally in the .map file it showed array a is not from file1.c but file2.c, and some unexpected data is put in .cc_m3_data also.  Has anyone experienced this issue and can give some explanation?

Outcomes