#30 Suspicious ".data" symbols ordering


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...


  • Ivan Maidanski

    Ivan Maidanski - 2009-11-21

    test case (compile it with -O1)

  • Paul Sokolovsky

    Paul Sokolovsky - 2011-02-05

    Please describe what are issues with this.


    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.

  • Paul Sokolovsky

    Paul Sokolovsky - 2011-02-05
    • priority: 5 --> 4

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks