This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question about the order global declarations are output
- From: Jim Wilson <wilson at specifixinc dot com>
- To: Mike Lerwill <mlist at ml-solutions dot co dot uk>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 13 May 2004 18:28:20 -0700
- Subject: Re: Question about the order global declarations are output
- References: <FGELLPDBIBNCBLEECDELKEGBLLAA.mlist@ml-solutions.co.uk>
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