Bug 3683 – Linker error on certain array expressions when using -release and -inline

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2010-01-06T17:11:00Z
Last change time
2014-04-18T09:12:05Z
Keywords
link-failure
Assigned to
nobody
Creator
eriatarka84

Attachments

IDFilenameSummaryContent-TypeSize
546slicebug.ziptwo source files and a build batch file to reproduce the bugapplication/zip536

Comments

Comment #0 by eriatarka84 — 2010-01-06T17:11:27Z
Created attachment 546 two source files and a build batch file to reproduce the bug It's pretty bizarre. I get a linker error from array expressions which seems to manifest itself only under the following set of circumstances: *) using certain complex array expressions, *) importing the module which does so from another one, *) specifying both -release and -inline, *) compiling and linking separately. Below is an example of an array expression which fails to link: buf1[] = buf1[] + 0.5f * buf2[]; And here is the output of OPTLINK: OPTLINK (R) for Win32 Release 8.00.2 Copyright (C) Digital Mars 1989-2009 All rights reserved. http://www.digitalmars.com/ctg/optlink.html Test.obj(Test) Offset 0037AH Record Type 00C3 Error 1: Previous Definition Different : __arraySliceSliceExpMulAddSliceAssign_f --- errorlevel 2 I've attached a sample project to demonstrate the problem. Run build.bat to reproduce. Note that compiling and linking all D files in one step seems to avoid the issue, but since I want to use Rebuild this is not a convenient workaround for me.
Comment #1 by yebblies — 2012-02-01T07:41:15Z
*** This issue has been marked as a duplicate of issue 5592 ***