[Issue 14202] New: Missing template instantiation (Phobos) with -inline
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Feb 19 13:35:40 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14202
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 at puremagic.com
Reporter: justin at 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
`_D3std5stdio4File14__T7rawReadTfZ7rawReadMFAfZAf':
missing_symbol.d:(.text._D3std5stdio4File14__T7rawReadTfZ7rawReadMFAfZAf+0x17d):
undefined reference to
`_D3std9exception196__T12errnoEnforceTbVAyaa81_2f686f6d652f6a757374696e2f2e64766d2f636f6d70696c6572732f646d642d322e3036372e302d62312f6c696e75782f62696e2f2e2e2f2e2e2f7372632f70686f626f732f7374642f737464696f2e64Vmi722Z12errnoEnforceFNfbLAyaZb'
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.
--
More information about the Digitalmars-d-bugs
mailing list