Bug 7502 – 2.056 regression: Assigning .init takes forever to compile for large structs
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-14T01:20:00Z
Last change time
2012-02-26T21:35:25Z
Assigned to
nobody
Creator
dlang-bugzilla
Comments
Comment #0 by dlang-bugzilla — 2012-02-14T01:20:12Z
struct S
{
int[0x10000] arr;
}
S s;
void f()
{
s = s.init;
}
Compiles quickly with 2.055, but too long to be practical with 2.056.
Workaround: use emplace.
Looking at the compiler stack trace, it seems to be stuck optimizing deeply-nested comma expressions (lots of cgcs.c:ecom in the stack).
(this isn't something that should block the 2.058 release)
Comment #1 by github-bugzilla — 2012-02-26T21:34:55Z