Bug 8989 – cfloat argument passing broken

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2012-11-09T15:34:00Z
Last change time
2015-06-09T05:11:42Z
Keywords
wrong-code
Assigned to
nobody
Creator
fawzi

Comments

Comment #0 by fawzi — 2012-11-09T15:34:21Z
It seems that while D2 does not have Issue 8294 it has another problem with complex arguments: --------- module t9; extern(C) int printf(const(char)*,...); void f(cdouble x,cdouble y,double m){ printf("%g %g*1i %g %g*1i %g\n",x.re,x.im,y.re,y.im,m); assert(x.im==y.im); // fails, y.im == x.re... } int main(immutable(char)[][] args){ cdouble a=1.2+3.0*1i; f(a,a,0.88); return 0; } ---------
Comment #1 by fawzi — 2012-11-09T15:35:22Z
this was with D 2.060
Comment #2 by clugdbug — 2013-03-04T01:37:10Z
This was actually a regression. It worked in 1.074, failed in 1.075, and was fixed in 1.076. The fix was part of the cleanup of two-register arguments.