[PATCH] Fix tree-opt/29788, plain CONST_DECL leaking through
Steve Kargl
sgk@troutmask.apl.washington.edu
Mon Nov 13 18:45:00 GMT 2006
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
More information about the Fortran
mailing list