www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4964] New: casting to undefined types crash dmd

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4964

           Summary: casting to undefined types crash dmd
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: spam extrawurst.org



---
int main(string[] argv)
{
    auto crash = cast(Foo*)&_addr;

    return 0;
}

yes both Foo and _addr are undefined and dmd issues errors for that but then it
sill crashes with an assert:

main.d(22): Error: identifier 'Foo' is not defined
main.d(22): Error: Foo is used as a type
Assertion failure: 'tn->mod & MODimmutable || tn->mod & MODconst' on line 875
in file 'mtype.c'


Tested on windows using dmd2.049

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 01 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4964


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |DUPLICATE



12:30:01 PST ---
*** This issue has been marked as a duplicate of issue 4434 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 07 2010