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


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugd...@yahoo.com.au
            Version|D1                          |D1 & D2


--- Comment #1 from Don <clugd...@yahoo.com.au> 2011-01-17 00:22:27 PST ---
This doesn't fail in the D1 version in svn.
This doesn't ICE on svn 852 "reduce reliance on varargs" but did ICE on svn 851
and earlier.
Here's a slightly reduced test case which ICEs on the version of D2 in svn.
Still requires -O -inline -release.
----
final class DataWrapper
{
    void* dat;

    void[] contents()
    {
        return dat[0..1];
    }
}

class Data
{
private:
    DataWrapper wrapper;
    size_t start, end;

public:
    this(void[] data) {}
    size_t length()
    {
        return end - start;
    }
}

Data daz(Data srcbuf)
{
    throw new Exception("xxx");
}

uint crc32(void[] data)
{
    int w;
    foreach(v;cast(ubyte[])data)
    {
        ++w;
    }
    return 0;
}


class HttpResponse
{
    Data zug;

    void setContent(Data data, string[] supported)
    {
        foreach(method;supported)
            switch(method)
            {
                default:
                    uint[] footer = [crc32(data.wrapper ?
data.wrapper.contents[data.start..data.end] : null ), data.end - data.start];
                    zug = daz(data);
                    return;
            }
    }
}
----

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

Reply via email to