[Bug rtl-optimization/25791] -O2 execution fails, -O and -g work
dick_guertin at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Thu Jan 19 06:41:00 GMT 2006
------- 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
More information about the Gcc-bugs
mailing list