[Issue 5672] New: Internal error: ..\ztc\cod2.c 461

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 1 06:15:23 PST 2011


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

           Summary: Internal error: ..\ztc\cod2.c 461
           Product: D
           Version: D2
          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> 2011-03-01 06:12:32 PST ---
enum Foo : ulong //remove the :ulong and the internal error is gone
{
    baa = 0B_001,
}

void bitfieldToStrings(T)(T _val)
{    
    string[] res;

    foreach(mem; __traits(allMembers, T))    
    {        
        if( (_val & 1) == 1 )
        {
            res ~= "foo";
        }
    }
}

void main(string[] argv)
{
    Foo bar;

    bitfieldToStrings(bar);
}


Just happens when compiled with : dmd main.d -O
Tested with dmd 2.051 and 2.052

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