Bug 7842 – ICE(cgcs.c) 517 with struct literal field increment

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-05T18:59:00Z
Last change time
2015-06-09T05:11:47Z
Keywords
ice
Assigned to
nobody
Creator
bearophile_hugs
Depends on
3008

Comments

Comment #0 by bearophile_hugs — 2012-04-05T18:59:09Z
struct Foo { int x; } void main() { Foo(5).x++; } DMD 2.059beta gives me: Internal error: backend\cgcs.c 517
Comment #1 by yebblies — 2012-10-28T05:17:39Z
This has the same cause as issue 3008, the increment should be rejected during semantic as it is trying to operate on an rvalue, but isn't because DotVarExp::modifiableLvalue only checks that that _type_ is modifiable.
Comment #2 by andrej.mitrovich — 2013-01-10T05:57:00Z
*** This issue has been marked as a duplicate of issue 3865 ***