Bug 7593 – cfloat to cdouble conversion is broken when using xmm
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-26T08:20:00Z
Last change time
2015-06-09T05:11:51Z
Keywords
pull, wrong-code
Assigned to
yebblies
Creator
yebblies
Comments
Comment #0 by yebblies — 2012-02-26T08:20:00Z
cdcnvt checks to see if the types are complex too late, if xmm registers are used this check is never reached and the wrong code is generated.
cdouble conv(cfloat a)
{
return a;
}
void main()
{
assert(conv(1.0f+1.0fi) == 1.0+1.0i);
}