Repro: echo "import std.datetime;" > a.d echo "import c;" > b.d echo "import std.algorithm; const var = sort(string[].init);" > c.d dmd -deps a.d b.d Outcome: core.exception.AssertError@dmd/glue.d(777): Assertion failure (segfault in release)
It looks like the order in which the files are provided matters: dmd -deps b.d a.d works as expected also working: dmd -deps a.d b.d c.d dmd -deps c.d b.d dmd -deps b.d c.d
@BorisCarvajal created dlang/dmd pull request #10960 "Fix Issue 18651 - ice: assert in glue.d:777 when building these three…" fixing this issue: - Fix Issue 18651 - ice: assert in glue.d:777 when building these three trivial files https://github.com/dlang/dmd/pull/10960
dlang/dmd pull request #10960 "Fix Issue 18651 - ice: assert in glue.d:777 when building these three…" was merged into stable: - 2f5854d3b785e1a72f7cc47535ea64d6e752b80f by Boris Carvajal: Fix Issue 18651 - ice: assert in glue.d:777 when building these three trivial files - cee9cb0d753ea0e532813d996d147c976a13d6ac by Boris Carvajal: Test case for issue 18651 https://github.com/dlang/dmd/pull/10960
dlang/dmd pull request #11027 "merge stable" was merged into master: - d96d44e229d25d7c88ffcd95f2b5dc34564a8136 by Boris Carvajal: Fix Issue 18651 - ice: assert in glue.d:777 when building these three… (#10960) Fix Issue 18651 - ice: assert in glue.d:777 when building these three… merged-on-behalf-of: Mathias LANG <pro.mathias.lang@gmail.com> https://github.com/dlang/dmd/pull/11027