www.digitalmars.com         C & C++   DMDScript  

D - Bug report: NPE on legal code

On my system (Win 2000) dmd crashes when compiling an adapted version of
gc2\gc.d:

Object _d_newclass(ClassInfo ci)
{
    void *p;

    debug(PRINTF) printf("_d_newclass(ci = %p)\n", ci);

/*
    if (ci.flags & 1)   // if COM object
    {
 // p = (Object)c.stdlib.malloc(ci.init.length);
 if (!p)
     _d_OutOfMemory();
    }
    else
    {
 // p = _gc.malloc(ci.init.length);
 debug(PRINTF) printf(" p = %p\n", p);
 // _gc.setFinalizer(p, &new_finalizer);
    }
*/

I commented out the calls to malloc/gc, and when I remote the '/*' and '*/'
the compiler crashes with a NPE
Jan 25 2003