Bug 1119 – Internal error: ../ztc/cgcod.c 2190 (template instantiation)

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
Other
OS
All
Creation time
2007-04-10T05:53:00Z
Last change time
2014-02-16T15:23:15Z
Keywords
ice-on-valid-code
Assigned to
bugzilla
Creator
zvrba

Comments

Comment #0 by zvrba — 2007-04-10T05:53:01Z
At 2007-04-09 I have downloaded the DMD package from the digitalmars web-page. I tried to code a veb-tree with template metaprogramming and ended up with the above-mentioned error. The command-line was /opt/dmd/bin/dmd -c vebtree.d The complete code can be found at the above URL.
Comment #1 by zvrba — 2007-04-10T05:55:09Z
(In reply to comment #0) > > The complete code can be found at the above URL. > Ah, the URL: http://www.core-dump.com.hr/vebtree.d
Comment #2 by matti.niemenmaa+dbugzilla — 2007-04-10T12:38:36Z
Reduced version: import std.intrinsic; private class Node(uint level, uint nlog) { Node!(level-1, nlog/2) bottom; } private class Node(uint level : 0, uint nlog : 5) { uint leaf; uint min() { return leaf == 0 ? 0 : bsf(leaf); } } alias Node!(2, 20) tree;
Comment #3 by onlystupidspamhere — 2007-04-10T13:35:43Z
(In reply to comment #2) Hehe, I created a bit more reduced version on #d today, but forgot to post it here. Here it is: import std.intrinsic; class Node(int l) { Node!(l-1) b; } class Node(int l : 0) { uint leaf = 0; int m() { return leaf ? 0 : bsf(leaf); } } alias Node!(1) tree;
Comment #4 by bugzilla — 2007-04-20T13:19:27Z
Fixed DMD 1.013