ICE: template.c:806: failed assertion `i < parameters->dim'

Jacob Carlborg doob at me.com
Wed Oct 28 08:20:52 PDT 2009


I have quite a big project and when I compile it I get this internal 
compiler error: template.c:806: failed assertion `i < parameters->dim'.
I don't know what could cause that error so I don't know where to look 
in my code to try to produce a small test case and report an issue. I'm 
using quite a lot of templates, template mixins and string mixins.

I'm using dmd v1.045, I also get the same error with the latest ldc with 
this backtrace:

Assertion failed: (i < parameters->dim), function 
deduceFunctionTemplateMatch, file 
/Users/doob/development/d/ldc/ldc/dmd/template.c, line 816.
0   ldc               0x00bea798 
llvm::sys::RWMutexImpl::writer_release() + 312
1   ldc               0x00beb231 
llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 1393
2   libSystem.B.dylib 0x955072bb _sigtramp + 43
3   libSystem.B.dylib 0xffffffff _sigtramp + 1789889903
4   libSystem.B.dylib 0x9557b23a raise + 26
5   libSystem.B.dylib 0x95587679 abort + 73
6   libSystem.B.dylib 0x9557c3db __assert_rtn + 101
7   ldc               0x000a0911 
TemplateDeclaration::deduceFunctionTemplateMatch(Loc, Objects*, 
Expression*, Expressions*, Objects*) + 2129
8   ldc               0x000a11fa 
TemplateDeclaration::deduceFunctionTemplate(Scope*, Loc, Objects*, 
Expression*, Expressions*, int) + 250
9   ldc               0x00041981 CallExp::semantic(Scope*) + 1009
10  ldc               0x000942f2 ReturnStatement::semantic(Scope*) + 386
11  ldc               0x0009146f CompoundStatement::semantic(Scope*) + 191
12  ldc               0x00048c83 FuncDeclaration::semantic3(Scope*) + 1875
13  ldc               0x0009a8b6 TemplateInstance::semantic3(Scope*) + 182
14  ldc               0x000a26c0 TemplateInstance::semantic(Scope*) + 1440
15  ldc               0x00042844 CallExp::semantic(Scope*) + 4788
16  ldc               0x000942f2 ReturnStatement::semantic(Scope*) + 386
17  ldc               0x0009146f CompoundStatement::semantic(Scope*) + 191
18  ldc               0x00048c83 FuncDeclaration::semantic3(Scope*) + 1875
19  ldc               0x00007b81 AttribDeclaration::semantic3(Scope*) + 113
20  ldc               0x000979e6 AggregateDeclaration::semantic3(Scope*) 
+ 150
21  ldc               0x00064886 Module::semantic3(Scope*) + 166
22  ldc               0x0010185f main + 4223
23  ldc               0x00004036 start + 54
24  ldc               0x00000011 start + 18446744073709535249



More information about the Digitalmars-d mailing list