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?
Comment #2 by k.hara.pg — 2015-09-08T05:38:20Z
Comment #3 by github-bugzilla — 2015-09-08T21:42:38Z
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/61f79a8aa18a2d551cfeb7c1bc218ebc3f21cfc6 fix Issue 15021 - linker error with speculative instantiation and -inline https://github.com/D-Programming-Language/dmd/commit/334e29178254ef0f02639b595a75f906e1b357ee Merge pull request #5055 from 9rnsr/fix15021 [REG2.068.1] Issue 15021 - linker error with speculative instantiation and -inline
Comment #4 by github-bugzilla — 2015-09-09T22:24:09Z