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: O2 optimization differences


Sujith R. wrote:
Hello,

I am finding the output differences between O2 flagged , optimized version and a -g3 -gdwarf-2 flagged debugable version of a C++ application , which does some very heavy , floating point , number crunching. The differences are with very small numbers (close to 0) like 1.234E-11 being treated as 0, but some subsequent calculations go for a toss.

The optimized and debug able binaries built on the same platform generate different outputs. This we are observing on both the platforms mentioned below:

	Platform A:  Linux 2.1 AS, gcc 2.96, RW SourcePro  3.0
	Platform B:  Linux 3.0 AS, gcc 3.2.3 , RW SourcePro 6.1

However the debug able binaries generated on these two platforms give the same output.

I need some detailed information of any issues related to the O2 flag used for optimization on any of the above platforms. If anybody has faced similar issues or come across any doc which talks about this, please share.

What hardware? Are you using -funsafe-math? Are you using -ffloat-store? What library versions? It is unclear from your description as to what the behaviour of the optimized debuggable version is wrt the plain optimized one.

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



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