← Back to index
|
Original Bugzilla link
Bug 7591 – Wrong const-folding comparisons involving complex nans
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-26T08:07:00Z
Last change time
2015-06-09T05:11:37Z
Keywords
pull, wrong-code
Assigned to
yebblies
Creator
yebblies
Comments
Comment #0
by yebblies — 2012-02-26T08:07:26Z
When compiled with -inline, the backend will attempt to const-fold the comparison and get the wrong result. cfloat get() { return cfloat.nan; } void main() { assert(!(get() == 0)); }
Comment #1
by yebblies — 2012-02-26T08:38:04Z
https://github.com/D-Programming-Language/dmd/pull/769
Comment #2
by bugzilla — 2012-05-19T13:28:41Z
Works in DMD 2.060.
Comment #3
by yebblies — 2012-07-10T23:55:26Z
https://github.com/D-Programming-Language/dmd/commit/b2b0585311e5b887eaf110231a3de06e86e68bd8