D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6972 - [CTFE] ICE with ubyte/=uint
Summary: [CTFE] ICE with ubyte/=uint
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:
Depends on:
Blocks:
 
Reported: 2011-11-18 12:02 UTC by Don
Modified: 2015-06-09 05:10 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 Don 2011-11-18 12:02:47 UTC
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.