Bug 1524 – ICE(constfold.c) on using "is" with strings in CTFE

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-09-22T06:22:00Z
Last change time
2014-02-17T22:51:13Z
Keywords
ice-on-valid-code, patch, rejects-valid
Assigned to
bugzilla
Creator
dlang-bugzilla

Attachments

IDFilenameSummaryContent-TypeSize
3511524patch.patchPatch against DMD2.029text/plain460

Comments

Comment #0 by dlang-bugzilla — 2007-09-22T06:22:41Z
----- bool isNull(char[] str) { return str is null; } const bool test = isNull("hello!"); ----- Output: > Assertion failure: '0' on line 838 in file 'constfold.c' > > abnormal program termination Replacing "is" with "==" fixes it.
Comment #1 by clugdbug — 2009-05-05T02:09:03Z
Created attachment 351 Patch against DMD2.029 Another trivial one. The case where only one parameter was null had been forgotten.
Comment #2 by bugzilla — 2009-07-09T02:46:02Z
Fixed dmd 1.046 and 2.031