Bug 16855 – Global void[0] causes OPTLINK Error when passed as ref Parameter

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2016-11-30T01:42:58Z
Last change time
2017-10-25T03:32:51Z
Keywords
Optlink
Assigned to
No Owner
Creator
Bolpat

Comments

Comment #0 by qs.il.paperinik — 2016-11-30T01:42:58Z
The following lusting generates a OPTLINK error. void[0] Dummy1; void f(ref void[0] x) { } void main() { f(Dummy1); static void[0] Dummy2; f(Dummy2); } It does not occur when a local void[0] is passed to f or the parameter is not ref. For Dummy1 it does not matter wether it is static or not.
Comment #1 by bugzilla — 2017-01-09T01:23:57Z
This produces the error: OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html bug4.obj(bug4) Offset 0026DH Record Type 009D Error 16: Index Range Error: linker exited with status 1 which looks like a corrupt object file being passed to it.
Comment #2 by bugzilla — 2017-10-25T03:32:51Z
*** This issue has been marked as a duplicate of issue 16129 ***