[Issue 6189] [64bit] optimizer: vector register content destroyed in function prolog

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 21 04:31:37 PDT 2012


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au
            Version|D2                          |D1 & D2
            Summary|register content destroyed  |[64bit] optimizer: vector
                   |in function prolog          |register content destroyed
                   |                            |in function prolog
           Severity|major                       |critical


--- Comment #8 from Don <clugdbug at yahoo.com.au> 2012-05-21 04:33:14 PDT ---
Modified test case applies to D1 as well. I hoped this was a duplicate of bug
8095 or 8060, but it isn't.

struct Point(T)
{
    T x, y;
}
alias Point!(int) IPoint;
alias Point!(float) FPoint;

void calcCoeffs(uint half, IPoint pos, FPoint[2] *pts, uint q)
{
    pos.x &= ~(half - 1);
    pos.y &= ~(half - 1);
    float xo = pos.x;
    float yo = pos.y;

    (*pts)[0].x -= xo;
    (*pts)[0].y -= yo;
    (*pts)[1].x -= xo;
    (*pts)[1].y -= yo;
}

void main()
{
    auto pos = IPoint(2, 2);
    FPoint[2] pts;
    pts[0] = pts[1] = FPoint(3, 3);
    auto f = &calcCoeffs;
    f(2, pos, &pts, 0);

    assert(pts[0].x == 1);
    assert(pts[0].y == 1);
    assert(pts[1].x == 1);
    assert(pts[1].y == 1);
}

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