[Issue 682] New: dmd segfault with vararg template

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 12 20:18:36 PST 2006


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

           Summary: dmd segfault with vararg template
           Product: D
           Version: 0.177
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: critical
          Priority: P1
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: davidl at 126.com


import std.stdio;
template a(char[]name, T...){
        char[] a(T t){
        char[] localchar;
        foreach(a;t)
        {
                localchar=typeof(a).mangleof;
        }
        return localchar;
        }
}
void main()
{
        a!("Adf"[],"afd",1234).a("Adf"[],"adf",1234);
}

dmd output:
global.errors = 0, gag = 0
003CF3F4 .. type=char[] e1=003C80A0
  003C80A0 string type=char[3]
Assertion failure: '0' on line 775 in file 'expression.c'

abnormal program termination


dmd throw me:


-- 



More information about the Digitalmars-d-bugs mailing list