Bug 15021 – [REG2.068.1] linker error with speculative instantiation and -inline
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-09-07T17:27:00Z
Last change time
2015-09-09T22:24:09Z
Keywords
link-failure, pull
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2015-09-07T17:27:23Z
cat > bug.d << CODE
import std.conv;
class AliasDeclaration
{
}
void aliasDeclaration(AliasDeclaration ad)
{
// This is extracted from VariantN
AliasDeclaration* zis;
static if (is(typeof(to!string(*zis))))
to!string(*zis);
}
void main()
{
}
CODE
dmd -inline bug
----
bug.o:bug.d:function _D3bug16aliasDeclarationFC3bug16AliasDeclarationZv: error: undefined reference to '_D3std6format54__T22enforceValidFormatSpecTC3bug16AliasDeclarationTaZ22enforceValidFormatSpecFNaNfKS3std6format18__T10FormatSpecTaZ10FormatSpecZv'
bug.o:bug.d:function _D3std4conv11__T2toTAyaZ31__T2toTC3bug16AliasDeclarationZ2toFC3bug16AliasDeclarationZAya: error: undefined reference to '_D3std6format54__T22enforceValidFormatSpecTC3bug16AliasDeclarationTaZ22enforceValidFormatSpecFNaNfKS3std6format18__T10FormatSpecTaZ10FormatSpecZv
----
This is most likely caused by https://github.com/D-Programming-Language/dmd/pull/4944 and broke any code using classes in Variant and specifically dfmt.
Comment #1 by code — 2015-09-07T17:38:54Z
Maybe we should do a 2.068.2 hotfix release for this?