O2 optimization differences

Sujith R. sujith_r01@infosys.com
Wed Sep 29 13:35:00 GMT 2004


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.

regards,
Sujith R.    



More information about the Gcc mailing list