Bug 8935 – ICE(cod3.c, cod4.c): Returning string literal casted to static array

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-11-02T05:07:00Z
Last change time
2015-06-09T05:15:11Z
Keywords
ice
Assigned to
nobody
Creator
bus_dbugzilla

Comments

Comment #0 by bus_dbugzilla — 2012-11-02T05:07:39Z
char[1] foo() { return cast(char[1])"a"; } $ dmd test.d Internal error: ..\ztc\cod3.c 528 Changing to zero-length moves the ICE to cod4.c: char[0] foo() { return cast(char[0])""; } $ dmd test.d Internal error: ..\ztc\cod4.c 359
Comment #1 by bugzilla — 2013-10-08T23:36:47Z
Works as of 2.064 head.