This snippet

    static immutable words = [ `zero`, `one`, `two` ];

    static immutable ubyte[string] wordsAA;

    static this()
    {
        foreach (ubyte i, e; words) { wordsAA[e] = i; }
    }

compiles and links on dmd git master but run segfaults.

Removing immutable qualifier from wordsAA avoids the segfeault.

Are static module ctors allowed to modify immutable data or this a DMD bug?

Reply via email to