GCC testing failed with your patch.

Geoff Keating geoffk@cygnus.com
Sun May 28 12:53:00 GMT 2000


> The new failures are:
> gcc.sum gcc.c-torture/execute/991216-4.c

The reason a native test doesn't see this is that apparently 2^32
iterations is insufficient to cause a timeout when running native.

The testcase was:

    int i;
    int num = 0;
    while (num < size)
    {
        for (i = 1; i < tries; i++) num++;
    }

The loop gets turned into

        li 9,5
.L15:
        li 0,9
        mtctr 0
.L25:
        addi 9,9,-1
        bdnz .L25
        cmpwi 0,9,0
        bne+ 0,.L15

in which the 'bne' is wrong, it should be 'bgt' (and in fact could be
optimised out altogether, the outer loop should not loop).

What happens is that after one pass through the outer loop, register 9
'num' has value -5.

-- 
- Geoffrey Keating <geoffk@cygnus.com>


More information about the Gcc-regression mailing list