[Issue 9377] New: Link-failure regression cause by fixing issue 8504

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 23 01:29:56 PST 2013


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

           Summary: Link-failure regression cause by fixing issue 8504
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: link-failure
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-01-23 01:29:53 PST ---
From:
https://github.com/D-Programming-Language/dmd/pull/1096#issuecomment-12584452

----
This pull breaks the following test case:

C:\cbx\mars\test>..\dmd -m32 -c mula mulb -lib
DMD v2.062 DEBUG

C:\cbx\mars\test>..\dmd -m32 multi mula.lib
DMD v2.062 DEBUG
OPTLINK (R) for Win32  Release 8.00.12
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
multi.obj(multi)
 Error 42: Symbol Undefined _D4mulb8__T3defZ3memFZv

mula.d:

import std.c.stdio;

import mulb;

void abc()
{
    printf("mulb.abc()\n");
    foo();
    bar();
}

mulb.d:

module mulb;

import std.c.stdio;

int j;

int foo()()
{
    printf("foo()\n");
    static int z = 7;
    assert(z != 10);
    return ++z;
}

void bar()
{
    assert(j == 7);
    foo();
    printf("bar\n");
}

template def()
{
    alias int defint;

    static this()
    {
        printf("def.static this()\n");
        j = 7;
    }

    void mem()
    {
        printf("def().mem()\n");
    }
}

def!().defint x;

multi.d:

import std.c.stdio;

import mula, mulb;

int main()
{
    printf("main\n");
    abc();
    def!().mem();
    return 0;
}

-- 
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