This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about the order global declarations are output


Mike Lerwill wrote:
Global objects are output into the assembly in reverse order compared to
where they appear in the source file. Can someone explain why this is done.

We need a proper bug report. A testcase, a configure target, compiler options, gcc version, etc. See
http://gcc.gnu.org/bugs.html
for info on how to report bugs.


I can't reproduce this using current mainline gcc sources, configured for x86-linux, using the following two testcases, compiled with -O -S.

Testcase 1:
int i;
int j;
int k;

Testcase 2:
int i = 0;
int j = 1;
int k = 2;
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]