When compiling the following code: ---- char[] replace(char[] subject) { auto app = Appender(); app.data.ptr[0..subject.length] = subject; return app.data; } struct Appender { char[] data; } enum foo = replace("$a = ?".dup); ---- With dmd 2.058, dmd gives the following: ---- $ dmd test.d test.d(5): Error: pointer cast from char[] to char* is not supported at compile time Segmentation fault: 11 ----
https://github.com/D-Programming-Language/dmd/pull/728
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/df8183e4046793b5d5cb61bf96a16eb94c7ac2e3 fix Issue 7527 - [CTFE] Segfault when slicing a pointer at compile time
*** Issue 7638 has been marked as a duplicate of this issue. ***