[Issue 710] New: compiler assertion failure w/ templates

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 22 03:04:47 PST 2006


http://d.puremagic.com/issues/show_bug.cgi?id=710

           Summary: compiler assertion failure w/ templates
           Product: D
           Version: 0.177
          Platform: PC
               URL: http://www.digitalmars.com/pnews/read.php?server=news.di
                    gitalmars.com&group=digitalmars.D.bugs&artnum=9574
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: ddaglas at gmail.com


The following code:

static int _i=0;

template NEXT(int idx) {
  const NEXT = idx;
}

interface Protocol {
  static ubyte HELO = NEXT!(_i++);
}

void main() { }

causes the Win32 dmd compiler to error with the following:

C:\>dmd z.d
global.errors = 0, gag = 0
00936D54 ++ type=int e1=00962524 e2=00936D78
  00962524 var var=_i type=int
  00936D78 1 type=int
Assertion failure: '0' on line 775 in file 'expression.c'

abnormal program termination

--- errorlevel 1


-- 



More information about the Digitalmars-d-bugs mailing list