www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14202] New: Missing template instantiation (Phobos) with


          Issue ID: 14202
           Summary: Missing template instantiation (Phobos) with -inline
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: justin economicmodeling.com

I am getting an "undefined reference" linker error with a trivial program that
only imports std.stdio, but only when compiling with -inline.  Minimized test
case below.

$ cat missing_symbol.d
import std.stdio;
void main(string[] args)
    auto f = File("");
    float[3] parts;
    auto n = f.rawRead(parts[]);

$ dmd -inline missing_symbol.d
missing_symbol.o: In function
undefined reference to
collect2: error: ld returned 1 exit status
--- errorlevel 1

This code compiles and links properly with 2.065.0.  I get the error above with
2.066.0, 2.066.1, and 2.067.0-b1.

Feb 19 2015