[PATCH] Fix reset_evolution_in_loop bug

Sebastian Pop sebastian.pop@cri.ensmp.fr
Mon Jun 6 16:49:00 GMT 2005


Jakub Jelinek wrote:
> On Mon, Jun 06, 2005 at 02:09:21PM +0200, Sebastian Pop wrote:
> > I installed the following patch in the gcc-4_0-branch after a
> > bootstrap and regtest on i686.
> > 
> > @@ -717,7 +724,7 @@ reset_evolution_in_loop (unsigned loop_n
> >  {
> >    if (TREE_CODE (chrec) == POLYNOMIAL_CHREC
> >        && CHREC_VARIABLE (chrec) > loop_num)
> > -    return build 
> > +    return build2
> >        (TREE_CODE (chrec), 
> >         build_int_cst (NULL_TREE, CHREC_VARIABLE (chrec)), 
> >         reset_evolution_in_loop (loop_num, CHREC_LEFT (chrec), new_evol), 
> 
> While looking at a (whitespace caused) merge conflict, I have noticed
> that this really can't be right.
> 
> POLYNOMIAL_CHREC is 3 operand tree, so using build2 to create
> it (and creating it with INTEGER_CST TREE_TYPE) IMHO must have never worked
> realy well.
> 
> Here is (so far untested) patch.  Ok for HEAD/4.0 if testing succeeds?
> 

yes, thanks for catching it.



More information about the Gcc-patches mailing list