[Issue 291] Bad code generation for real == 0, !=0 (incorrect for NaN)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Oct 2 04:24:33 PDT 2006
http://d.puremagic.com/issues/show_bug.cgi?id=291
clugdbug at yahoo.com.au changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Summary|uninitialized 'real' passes |Bad code generation for real
|for 0.0 |== 0, !=0 (incorrect for
| |NaN)
------- Comment #3 from clugdbug at yahoo.com.au 2006-10-02 06:24 -------
Changed name and severity of this bug, since it applies to !=0 as well as ==.
(Taken from bug 365):
void main()
{
real x = real.nan;
assert( x!=0 ); // fails
if (x==0) assert(0); // fails
}
It looks to me as though there's a JPE instruction missing, to cover the NaN
case. I'm no longer confident that this is a regression.
ie, should be
jp image00400000!_Dmain+0x23 (00402033)
jz image00400000!_Dmain+0x23 (00402033)
---------------------
--
More information about the Digitalmars-d-bugs
mailing list