← Back to index
|
Original Bugzilla link
Bug 13043 – Redundant linking to TypeInfo in non-root module
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2014-07-04T16:04:00Z
Last change time
2014-07-06T01:13:53Z
Keywords
link-failure, pull
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0
by k.hara.pg — 2014-07-04T16:04:33Z
In below test case, 'y' is non-root module, and typeid(Inner) is completely unneeded for the 'test' module compilation. But with -g -inline -version=bug, it is unnecessarily referenced and fail to link. module test; import y; void main() {} module y; struct QualifiedNameTests { struct Inner { const int opCmp(ref const Inner) { return 0; } } shared(const(Inner[string])[]) data; version(bug) size_t toHash() const { return typeid(typeof(data)).getHash(cast(const void*)&data); } } Command line: dmd -version=bug -g -inline test.d Output: Error 42: Symbol Undefined _D1y18QualifiedNameTests5Inner5opCmpMxFKxS1y18QualifiedNameTests5InnerZi
Comment #1
by k.hara.pg — 2014-07-04T17:16:34Z
https://github.com/D-Programming-Language/dmd/pull/3710
Comment #2
by github-bugzilla — 2014-07-06T01:13:52Z
Commit pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/896c1807e1961c333df1f89c4c0ce0feb2fca759
fix Issue 13043 - Redundant linking to TypeInfo in non-root module