[Issue 21299] [LINK] undefined reference to dmd.root.stringtable.StringValue!(Type).StringValue.lstring()
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 13 02:45:43 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21299
Dlang Bot <dlang-bot at dlang.rocks> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #11838 "[stable] Fix Issue 21299: Undefined reference to
dmd.root.stringtable.StringValue!(Type).lstring()" was merged into stable:
- fb78f0984632f6a9a2cef4dad5f1386115fc978a by Iain Buclaw:
Fix Issue 21299: Undefined reference to
dmd.root.stringtable.StringValue!(Type).lstring()
In `templateInstanceSemantic`, there exists special handling of matching
template instances for the same template declaration to ensure that only
at most one instance gets codegen'd.
If the primary instance `inst` originated from a non-root module, the
`minst` field will be updated so it is now coming from a root module,
however all Dsymbol `inst.members` of the instance still have their
`_scope.minst` pointing at the original non-root module. We must now
propagate `minst` to all members so that forward referenced dependencies
that get instantiated will also be appended to the root module,
otherwise there will be undefined references at link-time.
This doesn't affect compilations where all modules are compiled
together, as every module is a root module in that situation. What this
primarily affects are cases where there is a mix of root and non-root
modules, and a template was first instantiated in a non-root context,
then later instantiated again in a root context.
https://github.com/dlang/dmd/pull/11838
--
More information about the Digitalmars-d-bugs
mailing list