[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 --- Comment #15 from github-bugzi...@puremagic.com --- Commits pushed to dmd-cxx at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/646dc1969c78fdf43b981b973783efba08b11354 fix Issue 14198 - [REG2.067a] Link failure with Variant https://github.com/dlang/phobos/commit/8598139bde54ffa8e0888b965f11e3ac79914661 Merge pull request #3038 from WalterBright/fix14198 https://github.com/dlang/phobos/commit/77b9b31bb6484c87e45b1df787cd58a4452d05f2 fixup #3038 add reference to bugzilla issue 14198 https://github.com/dlang/phobos/commit/74d2c8aa799297ef404055390cbf24c04c94248c Merge pull request #3044 from MartinNowak/fixup3038 --
[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 --- Comment #14 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/646dc1969c78fdf43b981b973783efba08b11354 fix Issue 14198 - [REG2.067a] Link failure with Variant https://github.com/D-Programming-Language/phobos/commit/8598139bde54ffa8e0888b965f11e3ac79914661 Merge pull request #3038 from WalterBright/fix14198 https://github.com/D-Programming-Language/phobos/commit/77b9b31bb6484c87e45b1df787cd58a4452d05f2 fixup #3038 add reference to bugzilla issue 14198 https://github.com/D-Programming-Language/phobos/commit/74d2c8aa799297ef404055390cbf24c04c94248c Merge pull request #3044 from MartinNowak/fixup3038 --
[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 --- Comment #13 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a5bb5a092d8917776e3d5be5a70a3ee48326 fix Issue 14198 - Link failure with Variant https://github.com/D-Programming-Language/dmd/commit/f22d9dbb42b6a32d5b4c7c9f3db45e07c9f8aaf6 Merge pull request #4464 from 9rnsr/fix14198 --
[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 --- Comment #12 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/4dfde4caab8fb9e12c035784d5ddf33925ea3526 Merge pull request #3038 from WalterBright/fix14198 https://github.com/D-Programming-Language/phobos/commit/b2bbff77fa9eebb072d9c39ee505f9db4f24d997 Merge pull request #3044 from MartinNowak/fixup3038 --
[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 --- Comment #11 from github-bugzi...@puremagic.com --- Commits pushed to 2.067 at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/4dfde4caab8fb9e12c035784d5ddf33925ea3526 Merge pull request #3038 from WalterBright/fix14198 fix Issue 14198 - [REG2.067a] Link failure with Variant https://github.com/D-Programming-Language/phobos/commit/b2bbff77fa9eebb072d9c39ee505f9db4f24d997 Merge pull request #3044 from MartinNowak/fixup3038 fixup #3038 add reference to bugzilla issue 14198 --
[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull Status|RESOLVED|REOPENED Resolution|FIXED |--- --- Comment #9 from Kenji Hara k.hara...@gmail.com --- Fix inherent issue in compiler: https://github.com/D-Programming-Language/dmd/pull/4464 --
[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 --- Comment #10 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a5bb5a092d8917776e3d5be5a70a3ee48326 fix Issue 14198 - Link failure with Variant https://github.com/D-Programming-Language/dmd/commit/f22d9dbb42b6a32d5b4c7c9f3db45e07c9f8aaf6 Merge pull request #4464 from 9rnsr/fix14198 [REG2.067a] Issue 14198 - Link failure with Variant --
[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 --- Comment #7 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/646dc1969c78fdf43b981b973783efba08b11354 fix Issue 14198 - [REG2.067a] Link failure with Variant https://github.com/D-Programming-Language/phobos/commit/8598139bde54ffa8e0888b965f11e3ac79914661 Merge pull request #3038 from WalterBright/fix14198 fix Issue 14198 - [REG2.067a] Link failure with Variant --
[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 --- Comment #6 from Kenji Hara k.hara...@gmail.com --- Created attachment 1480 -- https://issues.dlang.org/attachment.cgi?id=1480action=edit Reduced test case. Running ng.bat will reproduce link-failure. (In reply to Kenji Hara from comment #1) Introduced in: https://github.com/D-Programming-Language/dmd/pull/4335 Sorry I was wrong. The issue commit that was introducing the change was in Phobos repository. https://github.com/D-Programming-Language/phobos/commit/a9d45235da6509e21450dea1825a5fa1dff9eed4#diff-54cf8402b22024ae667d4048a5126f0eL17 The commit has removed `import std.string;` from the module level scope in std.array. Unfortunately it triggered a previously unknown forward reference bug in compiler. See also the minimized test case I attached. --
[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 --- Comment #8 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/77b9b31bb6484c87e45b1df787cd58a4452d05f2 fixup #3038 add reference to bugzilla issue 14198 https://github.com/D-Programming-Language/phobos/commit/74d2c8aa799297ef404055390cbf24c04c94248c Merge pull request #3044 from MartinNowak/fixup3038 fixup #3038 add reference to bugzilla issue 14198 --
[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 --- Comment #5 from Walter Bright bugzi...@digitalmars.com --- https://github.com/D-Programming-Language/phobos/pull/3038 --
[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 --- Comment #3 from Walter Bright bugzi...@digitalmars.com --- This is crazy complicated. What's happening is in TemplateInstance::needsCodegen(), the minst for to!string is set to std.bitmanip, which is not a root module, and so needsCodegen() says it should be in Phobos.lib. However, std.bitmanip never actually instantiates to!string, so it is not found in phobos.lib, and the link fails. _D3std4conv11__T2toTAyaZ9__T2toTbZ2toFbZAya is to!string So, to!string's minst is being set wrong. The wrong value is set by this code in TemplateInstance::semantic(): --- // If the first instantiation was speculative, but this is not: if (!inst-minst) { // Mark it is a non-speculative instantiation. inst-minst = minst; here } --- minst is set to std.bitmanip during the evaluation of std.bitmanip.FloatRep, which calls: -- mixin(bitfields!( uint, fraction, 23, ubyte, exponent, 8, bool, sign, 1)); --- which winds up calling to!string at some point with sc-minst set to std.bitmanip. I don't know why to!string is not emitted when Phobos is built. --
[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 --- Comment #4 from Walter Bright bugzi...@digitalmars.com --- Hmm, a reference to: _D3std4conv11__T2toTAyaZ9__T2toTbZ2toFbZAya is generated, but there's a: _D3std4conv11__T2toTAyaZ9__T2toTbZ2toFNaNfbZAya in Phobos. The difference is the latter is Na (pure) and Nf (@safe). So, somehow attribute inference is happening in the latter but not the former. --
[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #2 from Walter Bright bugzi...@digitalmars.com --- This reduces to: --- import std.conv; struct S { ptrdiff_t function() fptr = handler; static ptrdiff_t handler() { static if (is(typeof(to!(string)(false { to!(string)(false); } return 0; } } void main() { } --- I don't think it has anything to do with 4335, but with emitting instantiations done during a typeof. --
[Issue 14198] [REG2.067a] Link failure with Variant
https://issues.dlang.org/show_bug.cgi?id=14198 --- Comment #1 from Kenji Hara k.hara...@gmail.com --- Introduced in: https://github.com/D-Programming-Language/dmd/pull/4335 But i'm not sure what is the problem. --