www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7634] New: optlink creates bad debug info for a large number of modules

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

           Summary: optlink creates bad debug info for a large number of
                    modules
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optlink
        AssignedTo: nobody puremagic.com
        ReportedBy: r.sagitario gmx.de



PST ---
Here's some code to generate 4000 functions:

import std.stdio;
import std.typetuple;

template countTuple(int n)
{
    static if (n > 0)
        alias TypeTuple!(countTuple!(n - 1), n - 1) countTuple;
    else
        alias TypeTuple!() countTuple;
}

void func(int i, int j)()
{
     writeln(i, j);
}

void fun()
{
    foreach(i; countTuple!(40))
        foreach(j; countTuple!(100))
            func!(i, j)();
}

When compiling it to a library with debug information:
dmd -g -lib test.d
And linking it with a simple main.d: import test; void main() { fun(); }
dmd -g main.d test.lib
SubSection: 0000 (<undefined>) iMod: 0 lfo: 76412 cb: 25 unsupported type 0 SubSection: 0120 (sstModule) iMod: 2731 lfo: 76440 The module numbers seem fixed, they also appear in completely different code. BTW: if you increase the numbers of functions to 10000, optlink crashes. Maybe some of the other reported crashes are related. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 03 2012