This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran 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: <1163431038.2539.61.camel@celery.andrew.com>
On Mon, Nov 13, 2006 at 07:17:18AM -0800, Andrew Pinski wrote:
> Hi,
> 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.
>
> Thanks,
> Andrew Pinski
>
> ChangeLog:
>
> * tree-inline.c (copy_body_r): Call fold after folding indirect
> reference.
>
> * gfortran.fortran-torture/compile/inline_1.f90: New test.
The new test is obviously OK. I can't approve the tree-inlince.c
change.
--
Steve