The following program causes the compiler to segfault. It compiles successfully if `Test.Name.Space.test` is not accessed. struct Test { extern(C++, Name.Space) { enum test = 0; } } void main() { assert(Test.Name.Space.test == 0); }
I think it segfaults because there's no concept of standalone enum values in C++ and the compiler does not now what to do. I would guess that you have hit some of the "Internal Compiler Error"s in https://github.com/D-Programming-Language/dmd/blob/master/src/cppmangle.d
Just a regular error nowadays