[Issue 23310] Segfault on switch with global enum

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 29 17:18:22 UTC 2022


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

--- Comment #2 from ryuukk_ <ryuukk.dev at gmail.com> ---
I should have been more precise in the report, i appologies


The issue is when compiling with a custom `object.d`

--- app.d
enum Test {A, B, C}

Test test = Test.A;

extern(C) void main()
{
    switch(test)
    {
        default:
        break;
    }
}


--- object.d
module object;



The following code compiles fine, but when you run the executable, it segfault


    dmd app.d object.d
    app.exe

--


More information about the Digitalmars-d-bugs mailing list