[Issue 891] New: Crash when compiling the following code (tested with	1.0, 1.001 and 1.002)
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Fri Jan 26 03:06:14 PST 2007
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=891
           Summary: Crash when compiling the following code (tested with
                    1.0, 1.001 and 1.002)
           Product: D
           Version: 1.001
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: jascha at mainia.de
class Vector(T, uint dim)
{
  T[dim]  data;
}
T dot(T,uint dim)(Vector!(T,dim) a, Vector!(T,dim) b)
{
  T tmp;
  for ( int i = 0; i < dim; ++i )
    tmp += a[i]*b[i];
  return tmp;
}
void main()
{
  Vector!(double,3) a,b;
  dot(a,b);
}
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list