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 Tue, 2006-11-14 at 10:14 -0800, Ian Lance Taylor wrote:
> Andrew Pinski <pinskia@gmail.com> writes:
> 
> > 	* tree-inline.c (copy_body_r): Call fold after folding indirect
> > 	reference.
> > 
> > 	* gfortran.fortran-torture/compile/inline_1.f90: New test.
> 
> > +	      *tp = fold (*tp);
> 
> I don't understand why this call to fold is needed if
> fold_indirect_ref_1 returned a non-NULL value.  In that case, it seems
> to me that we will have already folded the value.

The reason issue is fold_indirect_ref_1 does not fold a CONST_DECL after
folding *&CONST_DECL.  I have a better fix which was recommended by
Roger.

Thanks,
Andrew Pinski


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