This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: recursive rtl bug
- To: Bernd Schmidt <bernds at balti dot cygnus dot co dot uk>
- Subject: Re: recursive rtl bug
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 13 Dec 1999 20:25:09 -0700
- cc: Tom Truscott <trt at unx dot sas dot com>, gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
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