D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 18651 - ice: assert in glue.d:777 when building these three trivial files
Summary: ice: assert in glue.d:777 when building these three trivial files
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 major
Assignee: No Owner
URL:
Keywords: ice, pull
Depends on:
Blocks:
 
Reported: 2018-03-23 18:20 UTC by FeepingCreature
Modified: 2020-04-21 08:50 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description FeepingCreature 2018-03-23 18:20:01 UTC
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)
Comment 1 RazvanN 2018-03-26 11:47:58 UTC
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
Comment 2 Dlang Bot 2020-03-23 09:32:00 UTC
@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
Comment 3 Dlang Bot 2020-04-03 08:57:44 UTC
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
Comment 4 Dlang Bot 2020-04-21 08:50:25 UTC
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