1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -fdump-tree-pre-stats" } */
       3  
       4  extern void spoil (void);
       5  
       6  int foo(int **a,int argc)
       7  {
       8    int b;
       9    int d, e;
      10  
      11    if (argc)
      12      {
      13        d = *(*a);
      14      }
      15    else
      16      {
      17        /* Spoil *a and *(*a) to avoid hoisting it before the "if (...)".  */
      18        spoil ();
      19      }
      20    /* Should be able to eliminate one of the *(*a)'s along the if path
      21       by pushing it into the else path. We will also eliminate
      22       one of the *a's.  */
      23    e = *(*a);
      24    return d + e;
      25  }
      26  
      27  /* { dg-final { scan-tree-dump-times "Eliminated: 2" 1 "pre"} } */