[Issue 4964] New: casting to undefined types crash dmd

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 1 00:27:59 PDT 2010


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 at puremagic.com
        ReportedBy: spam at extrawurst.org


--- Comment #0 from Stephan Dilly <spam at extrawurst.org> 2010-10-01 00:27:41 PDT ---
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: -------


More information about the Digitalmars-d-bugs mailing list