Issue 15789 - ICE Assert in TemplateInstance semanticTiargs
Summary: ICE Assert in TemplateInstance semanticTiargs
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: ice, pull
Depends on:
Blocks:
 
Reported: 2016-03-11 20:17 UTC by Johan Engelen
Modified: 2017-08-02 08:07 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 Johan Engelen 2016-03-11 20:17:22 UTC
This issue was hard to reduce to a small testcase, and somehow only crashes when two files are compiled at the same time, and the InputRange type is in its own file.

inputrangetype.d:
```
struct InputRange
{
    ubyte[] front() {}
    void popFront() {}
    bool empty() {}
}
```

foo.d:
```
import std.digest.md;
import inputrangetype;

void foo()
{
    md5Of(InputRange());
}
```

bar.d:
```
import std.traits;
import std.digest.md;
import inputrangetype;

void bar()
{
    fullyQualifiedName!(md5Of!InputRange);
}
```

Compiled with this exact cmdline (reversing source files 'fixes' it):
  dmd foo.d bar.d
it crashes the compiler, with
core.exception.AssertError@dtemplate.d(7192): Assertion failure
https://github.com/D-Programming-Language/dmd/blob/204253b3111166cd30d5e42d936ed5f138920ff8/src/dtemplate.d#L7192
DMD64 D Compiler v2.070-devel-204253b
OS X El Capitan
Comment 2 Kenji Hara 2016-03-12 14:46:13 UTC
Better fix (IMO):
https://github.com/D-Programming-Language/dmd/pull/5520
Comment 3 github-bugzilla 2016-03-12 16:07:54 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/d316ee1dcec77250f1d27b35754d3b0bc703d017
fix Issue 15789 - ICE Assert in TemplateInstance semanticTiargs

https://github.com/D-Programming-Language/dmd/commit/98b7f150bf2c8e802881f91996111665fc35c239
Merge pull request #5520 from 9rnsr/fix15789

Issue 15789 - ICE Assert in TemplateInstance semanticTiargs
Comment 4 github-bugzilla 2017-08-02 08:07:35 UTC
Commit pushed to dmd-cxx at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/2a8484036e98353439754185e4814d5aee5b5aba
Issue 15789 - ICE Assert in TemplateInstance semanticTiargs