1  /* { dg-do compile { target ia32 } } */
       2  /* { dg-options "-O3 -fno-tree-fre -fno-tree-pre -fdump-tree-optimized -mtune=lakemont" } */
       3  
       4  int
       5  foo ()
       6  {
       7    const int a[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
       8    int i, sum;
       9  
      10    sum = 0;
      11    for (i = 0; i < sizeof (a) / sizeof (*a); i++)
      12      sum += a[i];
      13  
      14    return sum;
      15  }
      16  
      17  /* After late unrolling the above loop completely DOM should be
      18     able to optimize this to return 28.  */
      19  
      20  /* { dg-final { scan-tree-dump "return 28;" "optimized" } } */