[Issue 7959] New: dmd compiler crashes with internal error when main() redefined

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 20 23:40:49 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7959

           Summary: dmd compiler crashes with internal error when main()
                    redefined
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: thelastmammoth at gmail.com


--- Comment #0 from thelastmammoth at gmail.com 2012-04-20 23:41:46 PDT ---
>cat fun.d
module fun;
void main(){}

>cat main.d
module main;
import fun;
void main(){}

>rdmd main
Internal error: ../ztc/machobj.c 2149
//instead of gracefully giving an error that main shouldn't be defined
elsewhere

This is specific to main, as the following compiles fine:

>cat fun.d
module fun;
void fun(){}

>cat main.d
module main;
import fun;
void fun(){}
void main(){}

-- 
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