This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix tree-opt/29788, plain CONST_DECL leaking through


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]