Bug 5275 – x86_64 related hidden function parameter mishandled

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2010-11-25T15:03:00Z
Last change time
2015-06-09T05:11:44Z
Assigned to
nobody
Creator
braddr
Blocks
5264

Comments

Comment #0 by braddr — 2010-11-25T15:03:52Z
(split off from bug 5264) module hrm; struct BlkInfo { size_t size; } extern (C) BlkInfo gc_qalloc(); void __setArrayAllocLength(ref BlkInfo info) { if(info.size) {} } extern (C) void foo() { BlkInfo info = gc_qalloc(); __setArrayAllocLength(info); } $ dmd -m64 -c hrm.d Internal error: backend/cod1.c 2554 (same error and line number for both dmd1 and dmd2 from tip of svn for both) call cleanup code in cod1.c funccall(): 2936 if (tym1 == TYhfunc) 2937 { // Hidden parameter is popped off by the callee 2938 c = genadjesp(c, -4); 2939 stackpush -= 4; This code isn't aware of the 32 vs 64 bit calling convention differences yet?
Comment #1 by braddr — 2010-12-08T00:34:42Z
This too is fixed. Thanks Walter.