[Issue 8893] New: [ICE][CTFE] (interpret.c, line 3598) with failed array access

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 25 09:58:43 PDT 2012


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

           Summary: [ICE][CTFE] (interpret.c, line 3598) with failed array
                    access
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2012-10-25 09:58:42 PDT ---
struct Foo {
    char[3] data;
}
int bar(Foo f) {
    return f.data[0];
}
void main() {
    enum f = Foo(['A', 'B']);
    enum int b = bar(f);
}


DMD 2.061alpha:

test.d(8): Error: cannot implicitly convert expression (['A','B']) of type
char[] to char
Assertion failure: '0' on line 3598 in file 'interpret.c'

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