This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin 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: gcc bug: different results between -O0 and -O1


Hi!

Monday, 12 November, 2001 gilles civario civario@mimosa.ceng.cea.fr wrote:

gc> Wile developing a performance test program for gettimeofday resolution,
gc> I found a strange behavior for gcc under cygwin with the -O flags.
gc> Everywhere else with native compiler or with gcc, the program return constant
gc> results, with or without optimization. (On Sun, Dec, Linux and Fujitsu)
gc> Only with cygwin, the result is divided by 5000 from -O0 to -O1, both with
gc> gcc version 2.95.3-5 (cygwin special) and gcc version 3.0.2.
gc> But it shouldn't. Ok for a little increase, but not for 5000 !

you cannot reliably test float values for equality. you should rethink
the logic of your boucle () function to get reliable results.

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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