D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7185 - [CTFE] ICE on changing char array length
Summary: [CTFE] ICE on changing char array length
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2011-12-30 08:48 UTC by Denis Shelomovskii
Modified: 2012-01-04 18:25 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Denis Shelomovskii 2011-12-30 08:48:54 UTC
---
auto f() {
    auto arr = new char[2]; // no error with byte, int, etc.
    arr.length = 1;
    return arr;
}

enum e = f();
---
assert interpret.c(3560) oldval->op == TOKarrayliteral