This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Question on g++ compile options / numerical differences
- From: "Dockeen" <dockeen at mchsi dot com>
- To: <gcc at gcc dot gnu dot org>,<gcc-help at gcc dot gnu dot org>
- Date: Sun, 19 May 2002 20:39:14 +0600
- Subject: Question on g++ compile options / numerical differences
I have something that is probably some mistake on my part,
but might be an issue with g++ with different compile options
giving different results. I am running a code which performs
scene generation. When I compile with the following
options
-O3 -g -w -mcpu=pentium3 -march=pentium3
I get results that agree well with the 2.95.3 which is the
baseline gcc for Cygwin. If I add to the above options the
following:
-funroll-all-loops -fomit-frame-pointer -ffast-math
I get scenes that differ by a couple of factors of 10. I am
running with Windows XP-Pro on a a Pentium 3 laptop. I have
built gcc-3.1 in Cygwin as a separate set of compilers (C,C++,f77)
from the base Cygwin. I installed them in their own path,
/mygcc. I am running with the current Cygwin.
Now, maybe I am running into a problem with the two versions
of gcc running side by side. The only specific link in the
makefile that I run for 3.1 is that I include a -L/mygcc/lib.
Is there something transparently stupid in the additional
options above that might lead to numerical calculations going
bad? Does it require something else besides the gcc/lib be linked?
Am I just an illiterate moron?
Wayne Keen