Bug 14588 – [REG2.067] undefined reference error while linking with -debug option to a static library.

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-05-15T16:46:00Z
Last change time
2017-07-22T12:36:01Z
Keywords
link-failure, pull
Assigned to
nobody
Creator
elvis.x.zhou

Comments

Comment #0 by elvis.x.zhou — 2015-05-15T16:46:33Z
//testa.d module testa.d; void func(alias a, T, R...)() { } class A { int i; void all(T...)() { func!(i,T)(); } } //test.d import testd; void main() { new A().all!int(); } dmd -debug -lib testa.d //ok dmd -debug test.d testa.d //ok dmd test.a testa.a //ok dmd -debug test.d testa.a //error, undefined reference to func
Comment #1 by elvis.x.zhou — 2015-05-15T16:52:19Z
This is happened under dmd 2.067 and seems no problem with dmd 2.065
Comment #2 by ryan — 2015-05-16T13:14:40Z
More detail: The following works: ------------------------ //testa.d module testa.d; void func(alias a)() { } class A { int i; void all() { func!(i)(); } } --------------------- The following fails: --------------------- //testa.d module testa.d; void func(alias a)() { } class A { int i; void all()() { func!(i)(); } } Note the addition of an empty compile-time parameter list
Comment #3 by dlang-bugzilla — 2015-05-17T05:54:25Z
Comment #4 by k.hara.pg — 2015-06-30T11:25:49Z
Comment #5 by github-bugzilla — 2015-07-07T05:30:57Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/fcb7915ec75752a04892246be18632b077f7e2b7 fix Issue 14588 - undefined reference error while linking with -debug option to a static library https://github.com/D-Programming-Language/dmd/commit/0e0519692b8913487d12050f7ea0ef5702d2d64e Merge pull request #4787 from 9rnsr/fix14588 [REG2.067] Issue 14588 - undefined reference error while linking with -debug option to a static library
Comment #6 by github-bugzilla — 2015-07-07T11:10:59Z
Commit pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f67af18cd4f4c69eff63a72618e7ba5cc031753d Merge pull request #4787 from 9rnsr/fix14588 [REG2.067] Issue 14588 - undefined reference error while linking with -debug option to a static library
Comment #7 by github-bugzilla — 2015-07-24T03:20:20Z
Comment #8 by github-bugzilla — 2017-07-22T12:36:01Z
Commits pushed to dmd-cxx at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/fcb7915ec75752a04892246be18632b077f7e2b7 fix Issue 14588 - undefined reference error while linking with -debug option to a static library https://github.com/dlang/dmd/commit/0e0519692b8913487d12050f7ea0ef5702d2d64e Merge pull request #4787 from 9rnsr/fix14588