Bug 8294 – complex breaks calling in 64 bit DMD

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86_64
OS
Linux
Creation time
2012-06-25T04:41:00Z
Last change time
2013-03-04T01:35:39Z
Keywords
wrong-code
Assigned to
nobody
Creator
fawzi

Comments

Comment #0 by fawzi — 2012-06-25T04:41:24Z
module t; extern(C) int printf(char*,...); void fff(void delegate(char[]) d, cfloat x){ printf("%p %p\n".ptr,d.funcptr,d.ptr); } int main(char[][] argv){ cfloat x; auto d=delegate void(char[]) { }; printf("%p %p\n".ptr,d.funcptr,d.ptr); fff(d,x); return 0; } will print garbage in fff. The simple fact of passing in x pollutes the first argument. This is probably be related with Bug 5570, and the work done in it, as it is a 64 bit only issue. D2 does not seem to have the issue.
Comment #1 by clugdbug — 2013-03-04T01:35:39Z
Fixed in DMD1.075.