www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9486] New: Alias parameter breaks between modules for AA on x64


           Summary: Alias parameter breaks between modules for AA on x64
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: m.strashun gmail.com

--- Comment #0 from Dicebot <m.strashun gmail.com> 2013-02-08 10:28:02 PST ---
I am not sure what is exactly to blame and this could not find if there exists
issue on topic. Simple reproducible test case:

== mod.d ==
void func(alias arr)()
    arr["key"] = 43;

== test.d ==
import mod;

void main()
    auto arr = [ "key" : 42 ];

== shell ==
$ rdmd test.d
.../test.o: In function 
undefined reference to `_D3mod7__arrayZ'
collect2: ld returned 1 exit status
--- errorlevel 1

It will work if I do _any one_ following:
* Move func to test.d
* Alias integer variable
* Compile for x32 Linux

But on x64 this exact code results in provided error message upon linking.

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