Hi,

On Fri, 15 Jun 2007, [EMAIL PROTECTED] wrote:

>   This patch merges in the pointer_plus branch.  Hopefully I did not mess 
> anything up.

I found a small regression caused by this, e.g.:

int g(void);

void f(int *p, int i)
{
        p[i] = g();
        p[i + 2] = g();
        p[i + 1] = g();
        p[i + 100] = g();
}

If I compile it with -fdump-tree-original I get this in the dump:

  *(p + (unsigned int) ((unsigned int) i * 4)) = g ();
  *(p + ((unsigned int) ((unsigned int) i * 4) + 8)) = g ();
  *(p + ((unsigned int) i + 1) * 4) = g ();
  *(p + ((unsigned int) ((unsigned int) i * 4) + 400)) = g ();

Notice that it generates the (i + 1) * 4 instead of (i * 4) + 4 as with 
the other cases. While I tried to debug this I narrowed it down to the 
changes in fold_binary(), but I don't really know how to fix this, so 
I could use some help here.
Thanks.

bye, Roman

Reply via email to