D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 16080 - [REG2.071.0] Internal error: backend\cgobj.c 3406 when building static library
Summary: [REG2.071.0] Internal error: backend\cgobj.c 3406 when building static library
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P1 regression
Assignee: No Owner
URL:
Keywords: ice, ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2016-05-26 21:23 UTC by Sönke Ludwig
Modified: 2016-10-01 11:47 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 Sönke Ludwig 2016-05-26 21:23:55 UTC
Taking the following three modules:

a.d:
---
struct A() {
	static immutable A a;
}
---

b1.d
---
import a;
---

b2.d
---
import a;
void test2() {
	A!() v = A!().a;
}
---

Running "dmd -lib b1.d b2.d" results in:
Internal error: backend\cgobj.c 3406

Changing the order or taking away either b1.d or b2.d from the command line will make the build succeed.
Comment 1 Sönke Ludwig 2016-05-26 21:27:53 UTC
Introduced in 2.071.0, still happens in 2.071.1-b1
Comment 2 Walter Bright 2016-06-01 06:16:38 UTC
https://github.com/dlang/dmd/pull/5828
Comment 3 github-bugzilla 2016-06-01 12:45:06 UTC
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/4d867e5f41bed2593d75043a09d7b5f9b432e2db
fix Issue 16080 - [REG2.071.0] Internal error: backend\cgobj.c 3406 when building static library

https://github.com/dlang/dmd/commit/a80eb25ff46d92d17eecd8dd69739c6a892c9d52
Merge pull request #5828 from WalterBright/fix16080

fix Issue 16080 - [REG2.071.0] Internal error: backend\cgobj.c 3406 w…
Comment 4 github-bugzilla 2016-06-01 15:29:04 UTC
Commit pushed to stable at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/82c3dfb0e58f52e98ef131f9c4bb1c3c00e22939
Merge pull request #5828 from WalterBright/fix16080

fix Issue 16080 - [REG2.071.0] Internal error: backend\cgobj.c 3406 w…
Comment 5 github-bugzilla 2016-08-01 19:54:29 UTC
Commit pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/82c3dfb0e58f52e98ef131f9c4bb1c3c00e22939
Merge pull request #5828 from WalterBright/fix16080
Comment 6 github-bugzilla 2016-10-01 11:47:13 UTC
Commits pushed to stable at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/4d867e5f41bed2593d75043a09d7b5f9b432e2db
fix Issue 16080 - [REG2.071.0] Internal error: backend\cgobj.c 3406 when building static library

https://github.com/dlang/dmd/commit/a80eb25ff46d92d17eecd8dd69739c6a892c9d52
Merge pull request #5828 from WalterBright/fix16080