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.
Introduced in 2.071.0, still happens in 2.071.1-b1
https://github.com/dlang/dmd/pull/5828
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…
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…
Commit pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/82c3dfb0e58f52e98ef131f9c4bb1c3c00e22939 Merge pull request #5828 from WalterBright/fix16080
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