The following code compiles and run fine with LDC, but with DMD it compiles and then default at runtime

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

Test test = Test.A;

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

```

```
-- object.d
// empty for now
```


`dmd -m64 app.d && ./app.exe` compiles, running it segfault ⛔

`ldc2 -m64 app.d && ./app.exe` compiles, running it works ✅

Now the interesting part


`dmd -g -m64 app.d && ./app.exe` compiles, running it works! ✅

What `-g` does that makes this code compile and work with DMD?

Reply via email to