[Issue 6510] [CTFE] "internal error: illegal stack value" when compiled with -inline

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 19 05:53:42 PDT 2011


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



--- Comment #9 from Don <clugdbug at yahoo.com.au> 2011-08-19 05:53:36 PDT ---
Further reduced, showing that templates are not required. Seems to require an
inlined member function call to a member of a nested struct, called from a
nested function. No alias trick works in this case.

struct Stack6510 {
    struct Proxy { 
        void shrink() {}
    }
    Proxy stack;    
    void pop() {
        stack.shrink();        
    }
}

int bug6510() {
    static int used() {
        Stack6510 junk;
        junk.pop();
        return 3;
    }
    return used();
}

void main() {
    static assert(bug6510()==3);
}

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