This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/25791] -O2 execution fails, -O and -g work
- From: "dick_guertin at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2006 06:41:53 -0000
- Subject: [Bug rtl-optimization/25791] -O2 execution fails, -O and -g work
- References: <bug-25791-12018@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #17 from dick_guertin at yahoo dot com 2006-01-19 06:41 -------
I went back and recompiled all modules with -O -g to see what effect this has
on the order of static data. What I found was that all static data occurred in
memory in the order declared in the source code. This was NOT true with -O2,
where static data was moved around in some unknown order. I read through the
'man gcc' pages very carefully, and could NOT see any -option that would
control static data placement. Therefore, -O2 is a show-stopper for this
program because static data is NOT laid out in memory in the order declared in
the program source. Given this fact, it should be possible for me to create a
testcase that shows static data moves around with -O2, and stays in declared
order with -O.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25791