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



--- Comment #4 from Maxim Fomin <ma...@maxim-fomin.ru> 2013-02-10 12:44:35 PST 
---
I can reproduce on linux64 githead for both -m32 and m64

import core.stdc.stdio : printf;

struct S
{
    int i;
    size_t opDollar()
    {
        printf("Inside opDollar: %p\n", cast(void*)&this );
        //i = 0;
        return 10;
    }
    void opSlice(size_t , size_t)
    {
        printf("Inside opSlice:  %p\n", cast(void*)&this);
    }
    void getSlice()
    {
        printf("Inside get:      %p\n", cast(void*)&this);
        this[1 .. $];
    }
}

void main()
{
    S s;
    s.getSlice();
}

With -m32 and -m64 there is incorrect address in opDollar. With -inline it's
fine, with -g there is AssertError ("null this") and with -O I have "Error:
variable __dop5 used before set".

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

Reply via email to