5 GCC regressions, 1 new, with your patch on 2003-05-05T21:59:06Z.
Zack Weinberg
zack@codesourcery.com
Tue May 6 05:55:00 GMT 2003
Geoffrey Keating <geoffk@apple.com> writes:
>> The new failures are:
>> native gcc.sum gcc.c-torture/execute/920501-5.c
>>
> I'm pretty sure this is Zack's. The routine is:
>
> x (int i)
> {
> void *j[] = {&&x, &&y, &&z};
> goto *j[i];
> x:return 2;
> y:return 3;
> z:return 5;
>
> }
>
> and it gets compiled into:
>
> .data
> .const_data
> .align 2
> LC0:
> .long L2
> .long L3
> .long L4
> .text
> .align 2
> .globl _x
> _x:
> mflr r0
> stmw r30,-8(r1)
> stw r0,8(r1)
> stwu r1,-64(r1)
> mr r30,r1
> bcl 20,31,"L00000000001$pb"
> "L00000000001$pb":
> mflr r31
> stw r3,88(r30)
> addis r2,r31,ha16(LC0-"L00000000001$pb")
> la r2,lo16(LC0-"L00000000001$pb")(r2)
> lwz r0,0(r2)
> lwz r9,4(r2)
> lwz r2,8(r2)
> stw r0,32(r30)
> stw r9,36(r30)
> stw r2,40(r30)
> lwz r0,88(r30)
> slwi r2,r0,2
> addi r0,r30,24
> add r2,r2,r0
> addi r2,r2,8
> lwz r2,0(r2)
> mtctr r2
> bctr
> L2:
> L3:
> L4:
> .align 2
> .globl _main
> _main:
>
> which is Not Right; the rest of the routine has gone away. Perhaps
> some problem with the use count of the CODE_LABELs?
CODE_LABELs shouldn't go through my code at all, but I will try to
reproduce this with a cross compiler. Tomorrow, when I'm awake.
zw
More information about the Gcc-regression
mailing list