Bug 3865 – D1: ICE(cgcs.c): Assigning to struct literal member
Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2010-02-28T16:25:00Z
Last change time
2013-11-24T19:37:53Z
Keywords
ice
Assigned to
nobody
Creator
clugdbug
Comments
Comment #0 by clugdbug — 2010-02-28T16:25:39Z
Applies to both D1 and D2. Not a regression.
---
struct ICE3865{
int x;
}
void ice3865() {
ICE3865(0).x =3;
}
Comment #1 by clugdbug — 2010-04-21T13:00:19Z
Strange, I can't reproduce this on D2. I must have been mistaken -- this seems to be a D1-only bug.
Comment #2 by clugdbug — 2011-12-19T04:36:21Z
Test case which also applies to D2:
struct ICE3865{
int x;
}
void ice3865() {
ICE3865(7).x += 1;
}
Comment #3 by andrej.mitrovich — 2013-01-10T05:57:00Z
*** Issue 7842 has been marked as a duplicate of this issue. ***
Comment #4 by bugzilla — 2013-10-03T18:16:08Z
D2 2.064 produces:
test.d(6): Error: constant 7 is not an lvalue
Reclassified as D1 only bug.
Comment #5 by k.hara.pg — 2013-11-24T19:37:53Z
> struct ICE3865{
> int x;
> }
>
> void ice3865() {
> ICE3865(0).x =3;
> }
Maybe front-end optimizer wrongly constant-folds ICE3865(0).x to 0, then backend will cause ICE for the invalid AST `0 = 3`.
But, D1 is not supported anymore. So mark as WONTFIX.