[Issue 5592] New: Previous definition different: __arrayExpSliceMulSliceAddass_d

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 15 09:32:00 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5592

           Summary: Previous definition different:
                    __arrayExpSliceMulSliceAddass_d
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dsimcha at yahoo.com


--- Comment #0 from David Simcha <dsimcha at yahoo.com> 2011-02-15 09:29:27 PST ---
>From reading the disassembly it looks like every time
__arrayExpSliceMulSliceAddass_d is used, the implementation gets put in the
object file instead of just an exterm reference.

main.d:

import module1;

void main() {
    double[] a, b;
    doStuff(a, b);
    a[0..b.length] += b[0] * b[0..a.length];
}

module1.d:

void doStuff(double[] arr1, double[] arr2) {
    arr1[0..arr2.length] += arr2[0] * arr2[0..arr1.length];
}

Command lines:

dmd -c main.d
dmd -c module1.d
dmd main.obj module1.obj

Result:

OPTLINK (R) for Win32  Release 8.00.8
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
module1.obj(module1)  Offset 001FDH Record Type 00C3
 Error 1: Previous Definition Different : __arrayExpSliceMulSliceAddass_d
--- errorlevel 1

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list