Bug 6972 – [CTFE] ICE with ubyte/=uint

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-11-18T12:02:00Z
Last change time
2015-06-09T05:10:39Z
Assigned to
nobody
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2011-11-18T12:02:47Z
int blah() { ubyte n = 6; return n /= 2u; } static assert(blah()==3); CTFE internal error: unsupported assignment cast(uint)cast(int)n /= 2u Assertion failure: 'e1->op == TOKarraylength || e1->op == TOKvar || e1->op == TO Kdotvar || e1->op == TOKindex || e1->op == TOKslice' on line 3193 in file 'inter pret.c' Has been hitting this assert since 2.053; before that, it just gave a "unsupported at compile time" error.
Comment #1 by bugzilla — 2011-11-18T21:54:52Z