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

           Summary: [64-bit]  Inexplicable segfault in small code snippet,
                    -O -release -m64 only
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha <dsim...@yahoo.com> 2011-02-06 14:23:46 PST ---
The following code segfaults, but only when compiled with -O -release -m64.  If
any of these three options are omitted, it succeeds.  Also, note that it
doesn't throw a RangeError when bounds checking is turned on, so the issue is
not that that the bounds are somehow wrong.

void doStuff(byte start, byte end, uint increment = 1U) {
   auto output = new byte[3];

    size_t count = 0;
    for(byte i = start; i < end; i += increment) {
        output[count++] = i;
    }
}

void main()  {
    doStuff(0, 3);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to