www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1119] New: Internal error: ../ztc/cgcod.c 2190 (template instantiation)

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1119

           Summary: Internal error: ../ztc/cgcod.c 2190 (template
                    instantiation)
           Product: D
           Version: 1.010
          Platform: Other
               URL: http://www.core-dump.com.hr/vebtree.d
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: zvrba globalnet.hr


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.


-- 
Apr 10 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1119







 The complete code can be found at the above URL.
 
Ah, the URL: http://www.core-dump.com.hr/vebtree.d --
Apr 10 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1119


zvrba globalnet.hr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|blocker                     |critical




-- 
Apr 10 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1119


deewiant gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
         OS/Version|Linux                       |All





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;


-- 
Apr 10 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1119








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;


-- 
Apr 10 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1119


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 1.013


-- 
Apr 20 2007