[Issue 7789] New: [CTFE] null pointer exception on setting array length

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 28 11:22:14 PDT 2012


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

           Summary: [CTFE] null pointer exception on setting array length
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dawg at dawgfoto.de


--- Comment #0 from dawg at dawgfoto.de 2012-03-28 11:22:41 PDT ---
cat > bug.d << CODE
struct S
{
    size_t foo()
    {
        _ary.length += 1;
        return _ary.length;
    }

    int[] _ary;
}

enum len = S().foo();
CODE

dmd -c bug

--------

Happens only if array is a struct field and when
read-assign on length (pre/post-increment or opAssign).

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