[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#325131: gcc-4.0: regression on hppa and arm, possibly wrong code



Max Vozeler <max@decl.org>, 325131@bugs.debian.org 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;
}




Reply to: