Bug 15789 – ICE Assert in TemplateInstance semanticTiargs
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-03-11T20:17:00Z
Last change time
2017-08-02T08:07:35Z
Keywords
ice, pull
Assigned to
nobody
Creator
jbc.engelen
Comments
Comment #0 by jbc.engelen — 2016-03-11T20:17:22Z
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
[email protected](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