June 11, 2018
https://issues.dlang.org/show_bug.cgi?id=17712

Steven Schveighoffer <schveiguy@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy@yahoo.com

--- Comment #10 from Steven Schveighoffer <schveiguy@yahoo.com> ---
(In reply to Iain Buclaw from comment #3)
> The link error does not happen when compiling the test with -unittest.

I just want to point out that using -unittest currently is the same as using -allinst.

--
June 12, 2018
https://issues.dlang.org/show_bug.cgi?id=17712

--- Comment #11 from Basile B. <b2.temp@gmx.com> ---
interesting fact:

The problem doesn't happen when std.conv.toChars template parameter `radix` is changed from `ubyte` to `int` or when it changed to an `alias radix = 10`

--
June 12, 2018
https://issues.dlang.org/show_bug.cgi?id=17712

--- Comment #12 from Basile B. <b2.temp@gmx.com> ---
speculative could fail because it wrongly thinks that it will ALREADY be codegened.


in toImpl (line 1394 of std.conv) we have

---
return toChars!(10, EEType)(value + 0).array;
---

but if we specifies the type of value:

---
return toChars!(10, EEType, LetterCase.lower, typeof(value + 0))(value +
0).array;
---

than the test case passes. Maybe IFTI fails/is wrong with "value + 0", trick to promote) and then it gives another template that is HIM codegened.

--
June 13, 2018
https://issues.dlang.org/show_bug.cgi?id=17712

--- Comment #13 from Basile B. <b2.temp@gmx.com> ---
Other test case:

---
import std.datetime;
import std.typecons;
import std.variant;


Y a()
{
    Y n = Y(Y[].init);

    n.get!(X[]);
    return n;
}

struct X
{
    Y key;
}
struct Y
{
    Algebraic!(Y[]) value_;
    this(T)(T value)
    {
        value_ = value;
    }
    bool opEquals(T)(T rhs) const
    {
        static if(is(Unqual!T == Y))
        {
            return true;
        }
        else
        {
            return get!(T, No.x) == get!T;
        }
    }
    T get(T, Flag!"x" x = Yes.x)() const
    {
        return this[""].get!(T, x);
    }

    Y opIndex(T)(T index) const
    {
        const X[] pairs;
        if(pairs[0].key == index)
        {
            assert(0);
        }
        assert(0);
    }
}

void main(){}
---

linker error without -allinst

--
June 16, 2018
https://issues.dlang.org/show_bug.cgi?id=17712

Mike Franklin <slavo5150@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |slavo5150@yahoo.com

--- Comment #14 from Mike Franklin <slavo5150@yahoo.com> ---
This bug would be much easier to troubleshoot if it could be reduced to a couple of modules and *not* import any Phobos module.  A -betterC reproduction would be even better.  There's just too much noise when parsing and semantic-processing Phobos modules to see what's wrong and where.

--
July 02, 2018
https://issues.dlang.org/show_bug.cgi?id=17712

--- Comment #15 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Still reproducible on 2.081 release candidate (I've had to revert the commit
again).

--
September 07, 2018
https://issues.dlang.org/show_bug.cgi?id=17712

--- Comment #16 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/2f20661b0e0e8072cb0c056caddc3a7ef3cfd76a
Fix Issue 17712 - [REG 2.074] [LINK] Undefined reference to
std.conv.toChars!(10, char, 1, uint).toChars(uint)

https://github.com/dlang/phobos/commit/217c9af28f6fc9a4f8dc6f11d0eae0ed58805c43 Merge pull request #6659 from shove70/patch-1

Fix Issue 17712 - [REG 2.074] [LINK] Undefined reference to
std.conv.toChars!(10, char, 1, uint).toChars(uint)
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>

--
September 07, 2018
https://issues.dlang.org/show_bug.cgi?id=17712

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--
September 07, 2018
https://issues.dlang.org/show_bug.cgi?id=17712

--- Comment #17 from kinke@gmx.net ---
I'm not too happy about closing this, as the underlying issue definitely isn't fixed. I bet https://github.com/ldc-developers/ldc/issues/2846 (not LDC-specific) is yet another instance of this template culling issue.

--
September 08, 2018
https://issues.dlang.org/show_bug.cgi?id=17712

Basile B. <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #18 from Basile B. <b2.temp@gmx.com> ---
How hard would it be to have a @allinst function attribute, or better, a
pragma(allinst) ?

* -allinst is globally applied so not a ideal workaround.
* workarounds like the one that's been merged can't be done each time the
problem is encountered in phobos.

--