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


Nick Sabalausky <cbkbbej...@mailinator.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cbkbbej...@mailinator.com


--- Comment #6 from Nick Sabalausky <cbkbbej...@mailinator.com> 2012-01-16 
18:42:58 PST ---
This painful issue still exists in 2.057. Here's a simpler testcase for linux
(tested on 32bit):

testa.d:
----------------------------
import testb;

void main()
{
    string output;
    bar!(output)();
}
----------------------------

testb.d
----------------------------
struct Foo(alias al)
{
    int[] var;

    int func()
    {
        return var[0];
    }
}

void bar(alias al)()
{
    auto foo = Foo!(al)();
}
----------------------------

$dmd testa.d testb.d
testa.o: In function
`_D5testa4mainFZv37__T3FooS26_D5testa4mainFZv6outputAyaZ3Foo4funcMFZi':
testb.d:(.text._D5testa4mainFZv37__T3FooS26_D5testa4mainFZv6outputAyaZ3Foo4funcMFZi+0x3c):
undefined reference to `_D5testa7__arrayZ'
collect2: ld returned 1 exit status
--- errorlevel 1

The bug goes away if you compile with "-release", or (interestingly) if you
compile separately and then link.

The testcase above doesn't trigger the bug on Windows, but the problem *does*
exist on Windows too (I just don't have a reduced Windows test case right now).

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

Reply via email to