Bug 9643 – [64 bit] Incorrect cdouble passing for varags
Status
RESOLVED
Resolution
INVALID
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-03-04T01:43:50Z
Last change time
2020-09-15T07:00:16Z
Keywords
backend, wrong-code
Assigned to
No Owner
Creator
Don
Comments
Comment #0 by clugdbug — 2013-03-04T01:43:50Z
Test case from bug 5625 comment 3. This applies to D1 as well as D2.
---
import core.vararg;
void bar(TypeInfo[] arguments, va_list argptr)
{
creal values = va_arg!(cdouble)(argptr);
assert(values == 1.2 + 3.4i, "value didn't make it through intact");
}
void foo(...)
{
bar(_arguments, _argptr);
}
int main()
{
foo(1.2 + 3.4i);
return 0;
}
Comment #1 by bugzilla — 2020-09-15T07:00:16Z
> creal values = va_arg!(cdouble)(argptr);
The line should be:
cdouble values = va_arg!(cdouble)(argptr);
and then it works.