This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
Re: 5 GCC regressions, 1 new, with your patch on2003-05-05T21:59:06Z.
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Geoffrey Keating <geoffk at apple dot com>
- Cc: gcc-regression at gcc dot gnu dot org, aldyh at redhat dot com, ghazi at caip dot rutgers dot edu, hainque at act-europe dot fr, jakub at redhat dot com, janis187 at us dot ibm dot com, jason at redhat dot com, konqueror at gmx dot de
- Date: Mon, 05 May 2003 22:55:43 -0700
- Subject: Re: 5 GCC regressions, 1 new, with your patch on2003-05-05T21:59:06Z.
- References: <EA35D5F9-7F70-11D7-8831-0050E4BAD278@apple.com>
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