Bug 1269 – Compiler crash on assigning to an element of a void-initialized array in CTFE

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-06-16T08:44:00Z
Last change time
2014-02-16T15:25:39Z
Keywords
ice-on-valid-code
Assigned to
bugzilla
Creator
jascha

Comments

Comment #0 by jascha — 2007-06-16T08:44:42Z
import std.string; const uint VERSION_MAJOR = 0, VERSION_MINOR = 10, VERSION_PATCH = 2; const char[] VERSION_STRING = "Ddbg "~.toString(VERSION_MAJOR)~"."~(VERSION_MINOR>9?"":"0")~.toString(VERSION_MINOR) ~(VERSION_PATCH>0?"."~.toString(VERSION_PATCH):"")~" beta"; void main() {}
Comment #1 by matti.niemenmaa+dbugzilla — 2007-06-16T09:14:04Z
Brought it down to this, nothing to do with strings but rather with the attempted and failing CTFE of toString (here simplified and renamed f): int f() { // this also causes the crash: // int[] a = void; int[1] a = void; a[0] = 1; return 1; } const i = f(); It's probably dependent on Issue 1254, but they're subtly different so I won't set it as a dependency.
Comment #2 by matti.niemenmaa+dbugzilla — 2007-06-26T14:32:50Z
Fixed in DMD 1.017.