← Back to index
|
Original Bugzilla link
Bug 7527 – [CTFE] Segfault when slicing a pointer at compile time
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-16T15:35:00Z
Last change time
2012-03-11T12:51:31Z
Keywords
CTFE, ice
Assigned to
nobody
Creator
robert
Comments
Comment #0
by robert — 2012-02-16T15:35:18Z
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 ----
Comment #1
by bugzilla — 2012-02-17T16:04:25Z
https://github.com/D-Programming-Language/dmd/pull/728
Comment #2
by github-bugzilla — 2012-02-17T16:05:26Z
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
Comment #3
by timon.gehr — 2012-03-11T12:51:31Z
*** Issue 7638 has been marked as a duplicate of this issue. ***