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] improve C++ code by changing fold-const.c


On Tue, 2004-06-01 at 22:35, Andrew Pinski wrote:
> On Jun 2, 2004, at 00:30, Andrew Pinski wrote:
> 
> >
> > On Jun 2, 2004, at 00:12, Jeffrey A Law wrote:
> >> Basically if the inner & outer types are pointer types (which include
> >> references), then we want to compare what each type points to.  This
> >> (of course) iterates until one or both types are no longer a pointer
> >> type.
> >
> > Actually it looks like Dale messed up when he changed
> > tree_ssa_useless_type_conversion_1 to use the language hook and he  
> > changed
> > the checking of the how it considers the pointer types compatible,  
> > which
> > broke this tree_ssa_useless_type_conversion with this respect.
> > See
> > <http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa.c.diff? 
> > r1=1.1.4.212&r2=1.1.4.213&f=h>
> 
> 
> And here is the patch which fixes the mess up by Dale also improves
> all of the code I have been looking at too.
> 
> OK? Bootstrapped on powerpc-apple-darwin with no regressions.
> 
> Thanks,
> Andrew Pinski
> 
> ChangeLog:
> 	* tree-ssa.c: Check the type which the pointer points to
> 	instead of the pointer types.
This is fine.  It would also be nice if you could convert your three
examples into tests for the testsuite.
Jeff



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