www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Bug 37] New: Inconsistent type information generated for .classinfo accessing

http://d.puremagic.com/bugzilla/show_bug.cgi?id=37

           Summary: Inconsistent type information generated for .classinfo
                    accessing
           Product: D
           Version: 0.149
          Platform: Macintosh
        OS/Version: Mac OS X
            Status: NEW
          Keywords: ice-on-valid-code, patch
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: braddr puremagic.com
        ReportedBy: braddr puremagic.com


gdc/gcc has a mode for the compiler to check lots of internal consistency data.
 During compilation of phobos, a problem with .classinfo accessing was found. 
Adding the following cast matches things up:

--- mtype.c.orig        2006-03-11 20:37:17.000000000 -0600
+++ mtype.c     2006-03-11 20:37:21.000000000 -0600
   -3919,6 +3919,7   
            }
            else
            {
+               e = new CastExp(e->loc, e, t->pointerTo()->pointerTo());
                e = new PtrExp(e->loc, e);
                e->type = t->pointerTo();
                if (sym->isInterfaceDeclaration())


-- 
Mar 12 2006