Max Vozeler <[EMAIL PROTECTED]>, [EMAIL PROTECTED] schrieb am 12.09.05 13:48:41:
> On Mon, Sep 12, 2005 at 01:29:38PM +0200, Max Vozeler wrote:
> > I've been able to find a reduced testcase that shows the problem.
> > can find below the results using gcc-3.4 and gcc-4.0 with -O1/-O2 each.
> > The problem only shows with gcc-4.0 and -O2 on hppa.

Thanks a lot, this is really helpful.

Here is a smaller test case. It also fails on i386 with gcc-4.120050705 at  -O2 
-fschedule-insns,
but not with -fno-schedule-insns, so the bug seems to be in instruction 
scheduling.

void abort(void);

unsigned long long f(unsigned long long x) {
    return ((x >> 8) | (x << 56)) ^ ((x >> 48) | (x << 16)) ^ (x >> 1);
}

int main() {
    volatile unsigned long long v = 0x1122334455667788ULL;
    if (f(v) != 0xb3c46ef7196e4c91ULL)
        abort();
    return 0;
}



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to