[Bug c++/40186] floating point comparison is wrong ( !(a b) (b a) is true )
--- Comment #4 from ich at az2000 dot de 2009-05-18 13:38 --- Created an attachment (id=17888) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17888action=view) simpler test case (now for wrong ordering case 1) I was able to reproduce the first case now (wrong ordering 1). I also removed some parts from the test case, it's much shorter now. This occurs only with -Os now, in all other cases, I don't hit the problem. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40186
[Bug c++/40186] floating point comparison is wrong ( !(a b) (b a) is true )
--- Comment #5 from pinskia at gcc dot gnu dot org 2009-05-18 14:11 --- *** This bug has been marked as a duplicate of 323 *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40186
[Bug c++/40186] floating point comparison is wrong ( !(a b) (b a) is true )
--- Comment #6 from pinskia at gcc dot gnu dot org 2009-05-18 14:49 --- Either use -ffloat-store or -mfpmath=sse . The issue comes from excessive precision. It is not or which is causing the problem but keeping one of a or b in the fp stack register but putting the other one on the normal memory. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40186
[Bug c++/40186] floating point comparison is wrong ( !(a b) (b a) is true )
--- Comment #7 from sliwa at cft dot edu dot pl 2009-05-18 14:52 --- The case (a b) (b a) shows that not discarding the extra precision before performing a comparison leads to serious problems. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40186
[Bug c++/40186] floating point comparison is wrong ( !(a b) (b a) is true )
--- Comment #8 from vincent at vinc17 dot org 2009-05-18 14:56 --- Are you sure that this comes from the extended precision? This would mean that GCC does implicit extended - double conversions in an asymmetric way, and IIRC, I've never seen that. I can't reproduce the problem with g++-4.4 -mfpmath=387 -Os on an x86_64 machine. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40186