Bug 365 – Regression: Bad code generation for floating point == and !=
Status
RESOLVED
Resolution
DUPLICATE
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-09-24T13:52:00Z
Last change time
2014-02-15T13:22:10Z
Keywords
wrong-code
Assigned to
bugzilla
Creator
clugdbug
Comments
Comment #0 by clugdbug — 2006-09-24T13:52:09Z
NaNs are currently comparing equal to zero!
>, >=, !<>=, etc all seem to be OK.
-------
void main()
{
real x = real.nan;
assert( x!=0 ); // fails
if (x==0) assert(0); // fails
}