D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4020 - [ICE][CTFE] struct postblit in CTFE
Summary: [ICE][CTFE] struct postblit in CTFE
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2010-03-28 06:32 UTC by bearophile_hugs
Modified: 2015-06-09 05:13 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2010-03-28 06:32:30 UTC
This code crashes the dmd V.2.042:


struct Foo {
    int x;
    this(this) { x++; }
}
int bar() {
    Foo f;
    f = f;
    assert(f.x == 1);
    return 0;
}
enum _ = bar();
void main() {}
Comment 1 Walter Bright 2010-04-01 13:54:20 UTC
changeset 429
Comment 2 Don 2010-04-09 13:36:48 UTC
Fixed DMD 2.043.