Bug 14425 – Indirect template instantiation within is expression causes missing linker symbols

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-04-08T23:16:00Z
Last change time
2015-06-17T21:04:45Z
Keywords
link-failure, pull
Assigned to
nobody
Creator
sludwig

Comments

Comment #0 by sludwig — 2015-04-08T23:16:58Z
The following causes the linker to complain about missing Foo!string.__xopEquals and .__xtoHash: --- struct Foo(I) { I i; } struct Bar(I) { I i; } static assert(is(Foo!(Bar!string))); --- Workaround is to explicitly instantiate the template: alias Workaround = Foo!(Bar!string);
Comment #1 by sludwig — 2015-04-08T23:22:07Z
Happens only for builds without the -debug flag.
Comment #2 by k.hara.pg — 2015-04-13T15:11:33Z
In Windows, `-m64` or `-m32 -g` can reproduce same link-failure. https://github.com/D-Programming-Language/dmd/pull/4587
Comment #3 by github-bugzilla — 2015-04-17T15:33:37Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/37da110ed629b493970b6e3170e38ee6e78b2e04 fix Issue 14425 - Indirect template instantiation within is expression causes missing linker symbols https://github.com/D-Programming-Language/dmd/commit/95ff133b423813a0f4b11c7c1369a22536d002d9 Merge pull request #4587 from 9rnsr/fix14425 Issue 14425 - Indirect template instantiation within is expression causes missing linker symbols
Comment #4 by github-bugzilla — 2015-06-17T21:04:45Z
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/37da110ed629b493970b6e3170e38ee6e78b2e04 fix Issue 14425 - Indirect template instantiation within is expression causes missing linker symbols https://github.com/D-Programming-Language/dmd/commit/95ff133b423813a0f4b11c7c1369a22536d002d9 Merge pull request #4587 from 9rnsr/fix14425