[Issue 7248] New: [CTFE] Stack overflow on using struct filed pointer with address of array element

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 8 03:47:40 PST 2012


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

           Summary: [CTFE] Stack overflow on using struct filed pointer
                    with address of array element
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com


--- Comment #0 from Denis <verylonglogin.reg at gmail.com> 2012-01-08 14:47:36 MSK ---
---
struct S { S* ptr; }

int f() {
    S[1] sarr;
    sarr[0].ptr = &sarr[0];
    sarr[0].ptr = null; // causes Stack overflow
    S* t = sarr[0].ptr; // Regression: ditto for head, works with 2.057
    return 0;
}

enum e = f();
---

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