www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6131] New: [CTFE] Simple call of struct methods causes "Stack overflow" or hanging-up

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6131

           Summary: [CTFE] Simple call of struct methods causes "Stack
                    overflow" or hanging-up
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



---
Created an attachment (id=994)
Bug testcase

Source code in an attachment

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 09 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6131


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug yahoo.com.au



This is fixed in git master. Probably a dup of an bug which has already been
fixed, but I haven't worked out which one. This is the test case:
--
struct S2 {
    int e;
    void f2() {
        //e = 0; //uncomment to hang-up dmd v2.053
        int t = e; //uncomment to "Stack overflow" dmd v2.053
    }
}

struct S1 {
    S2 s2;
    void f1() {
        s2.f2();
    }
}

int f() {
    S1 s1;
    s1.f1();
    return 0;
}

const t = f();

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 09 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6131


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



Already fixed in git master

*** This issue has been marked as a duplicate of issue 5258 ***

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