recursive rtl bug
Jeffrey A Law
law@cygnus.com
Fri Dec 31 20:54:00 GMT 1999
In message < Pine.LNX.4.10.9912131507270.8922-100000@balti.cygnus.co.uk >you wr
ite:
> On Tue, 23 Nov 1999, Tom Truscott wrote:
>
> > I reported this SEGV a while back, but alas it is still happening:
> > GNU C version 2.96 19991122 (experimental) (i686-pc-linux-gnu)
> >
> > /* "gcc -O foo.c" gets a SEGV */
> > void foo(double bar[], double *zp, int n)
> > {
> > int i, j;
> >
> > i = 0;
> > for(j = 0; j < n; j++)
> > {
> > i += j+1;
> > bar[i] *= (1.0 + *zp);
> > }
> > }
> >
> > Here is some rudimentary debugging that might help.
> > A self-referent rtl is created, which can be trapped with:
>
> Here's a patch to fix it. The problem is that we're generating shared rtl
> in combine. Later, we substitute in one expression and the other one
> gets magically changed as well.
>
> Bernd
>
> * combine.c (combine_simplify_rtx): Don't create shared rtl.
This is fine (including the other places where it needs to be fixed). Please
install this change as well as the testcase.
Thanks,
jeff
More information about the Gcc-bugs
mailing list