https://issues.dlang.org/show_bug.cgi?id=15205

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #2 from [email protected] ---
Encountered what seems to be the same issue. Reproduces on DMD 2.084.0 and LDC
1.13.0

import std.stdio;

struct Foo
{
    static Foo initializedFoo()
    {
        Foo x;
        x.a_array[0] = 1;
        return x;
    }

    union
    {
        float a;
        float[1] a_array;
    }
}

Foo bar = Foo.initializedFoo();

void main()
{
    writeln(bar.a);
    writeln(bar.a_array);
}

returns nan [nan] instead of 1 [1]

--

Reply via email to