Bug 13921 – ICE with template instantiation error

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-01-01T12:32:00Z
Last change time
2015-02-18T03:41:46Z
Keywords
ice, pull
Assigned to
nobody
Creator
sinkuupump

Comments

Comment #0 by sinkuupump — 2015-01-01T12:32:28Z
Compiler crashes with the code below. This is introduced in https://github.com/D-Programming-Language/dmd/pull/4091 Code: struct S(N) { void fun() { undefined_identifier; // or anything that makes the instantiation fail } } void test(T)(S!T) { } void main() { S!string g; test(g); } Output: % dmd | head -n1 DMD64 D Compiler v2.067-devel-60bdb8c % dmd -c test.d test.d(5): Error: undefined identifier undefined_identifier test.d(16): Error: template instance test.S!string error instantiating dmd: template.c:2621: FuncDeclaration* TemplateDeclaration::doHeaderInstantiation(TemplateInstance*, Scope*, FuncDeclaration*, Type*, Expressions*): Assertion `fd->type->ty != Tfunction' failed.
Comment #1 by k.hara.pg — 2015-01-02T08:15:24Z
Comment #2 by github-bugzilla — 2015-01-02T15:12:29Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/70eda8d95cf1adab848f9a807961c409af90164a fix Issue 13921 - ICE with template instantiation error https://github.com/D-Programming-Language/dmd/commit/39b6e305b8e8d7d25b9d4a7e1d6a66ac57afdb33 Merge pull request #4229 from 9rnsr/fix13921 [REG2.067a] Issue 13921 - ICE with template instantiation error
Comment #3 by github-bugzilla — 2015-02-18T03:41:46Z