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
Comment #1 by jbc.engelen — 2016-03-12T10:22:02Z
Comment #2 by k.hara.pg — 2016-03-12T14:46:13Z
Comment #3 by github-bugzilla — 2016-03-12T16:07:54Z
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 by github-bugzilla — 2017-08-02T08:07:35Z
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