--- Comment #6 from Witold Baryluk <> 2010-01-29 
05:48:52 PST ---
(In reply to comment #4)
> I'm not certain that there's a bug here (difficult to tell without reducing 
> the
> test case further). It could be that in the optimised case you have a 
> temporary
> value stored in a register, increasing the precision. It's legal for the
> compiler to do that. Adding a function call stops DMD from keeping the value 
> in
> a register.
> Anyway you need to cut the test case down significantly.
> BTW it behaves the same way on DMD0.175, so this is definitely not a
> regression.

Hmm, You are probably right.

Changing coditions to:
    if (left <= half) {

    if (half >= right) {

solves problem.

Interesingly compiling in gdc even with -O3 -finline -frelease
-funsafe-math-optimizations -frounding-math -ffast-math doesn't bring this

What is also problematic is that even adding forcibly something like
cast(double) doesn't solve problem (they are noop's, becuase they are already
of correct type).

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to