This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix tree-opt/29788, plain CONST_DECL leaking through
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Mon, 13 Nov 2006 10:24:25 -0800
- Subject: Re: [PATCH] Fix tree-opt/29788, plain CONST_DECL leaking through
- References: <firstname.lastname@example.org>
On Mon, Nov 13, 2006 at 07:17:18AM -0800, Andrew Pinski wrote:
> The problem here is that the inliner folds *&CONST_DECL to CONST_DECL
> but it forgot to inline the value of the CONST_DECL. It is not valid to
> have a plain CONST_DECL in the IR and it causes different ICEs,
> depending on if PRE runs or not.
> This patch fixes the problem by running fold after folding *&CONST_DECL.
> OK? Bootstrapped and tested on i686-linux-gnu with no regressions.
> Andrew Pinski
> * tree-inline.c (copy_body_r): Call fold after folding indirect
> * gfortran.fortran-torture/compile/inline_1.f90: New test.
The new test is obviously OK. I can't approve the tree-inlince.c