D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7502 - 2.056 regression: Assigning .init takes forever to compile for large structs
Summary: 2.056 regression: Assigning .init takes forever to compile for large structs
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 regression
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-14 01:20 UTC by Vladimir Panteleev
Modified: 2012-02-26 21:35 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 Vladimir Panteleev 2012-02-14 01:20:12 UTC
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 github-bugzilla 2012-02-26 21:34:55 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/3f88f156879841ef79162916b2dbbf28e2a1fcc3
fix Issue 7502 - 2.056 regression: Assigning .init takes forever to compile for large structs