I've discovered that it symbols in .data section (unlike .bss one) are neither in the odrer they are defined in .c file nor in the reversed order if optimization is on.
I haven't seen such behavior in other compilers or gcc toolchains (I've checked VC++ 9, eVC++, MinGW, mingw-w64).
The test case attached (compile it with at least -O1; to make output goes to a log file, compile it with -DUSE_LOGFILE).
May be, it's not a bug but such a feature...
test case (compile it with -O1)
Please describe what are issues with this.
And:
Thanks for your bug report!
To ease maintenance of the project, we are migrating bug tracking facilities to Trac. We would appreciate if you re-posted this bug on Trac via https://sourceforge.net/apps/trac/cegcc/newticket . Please include link to this bug for reference.