1  /* { dg-do compile } */
       2  /* { dg-options "-O -fdump-tree-optimized" } */
       3  
       4  int *p;
       5  int *foo (int *q, int i, int j)
       6  {
       7    p = q + i;
       8    return p + j;
       9  }
      10  
      11  /* We shouldn't associate (q + i) + j to q + (i + j) here as we
      12     need q + i as well.  */
      13  
      14  /* { dg-final { scan-tree-dump-times "\\+" 2 "optimized" } } */