www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22044] New: DMD produces corrupt object files with -inline


          Issue ID: 22044
           Summary: DMD produces corrupt object files with -inline
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: dlang-bugzilla thecybershadow.net

//////////////////// bug.d ///////////////////
    import std.traits : fullyQualifiedName;
    string s = fullyQualifiedName!Object;
    return ``;
} ());

import std.net.curl;

void[] read(string path) { return get(path); }

Command: dmd -main -inline bug.d

All kinds of various errors across DMD versions, such as

invalid string offset 51118083 >= 79467 for section `.strtab'


warning: allocated section `.interp' not in segment

With 2.097:

multiple definition of `_tlsstart'; /usr/sbin/ld: bug.o: could not read
symbols: file truncated

Downstream issue:


Jun 19 2021