1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -fdump-tree-lim2-details" } */
       3  
       4  volatile int x;
       5  volatile int y;
       6  void
       7  bar (int, char *, char *);
       8  void
       9  foo (int *a, int n, int m, int s, int t)
      10  {
      11    int i;
      12    int j;
      13    int k;
      14  
      15    for (i = 0; i < m; i++) // Loop 1
      16      {
      17        if (__builtin_expect (x, 0))
      18  	for (j = 0; j < n; j++) // Loop 2
      19  	  if (__builtin_expect (y, 0))
      20  	    for (k = 0; k < n; k++) // Loop 3
      21  	      {
      22  		bar (s / 5, "one", "two");
      23  		a[t] = s;
      24  	      }
      25        a[t] = t;
      26      }
      27  }
      28  
      29  /* { dg-final { scan-tree-dump-times "out of loop 3" 4 "lim2" } } */
      30  /* { dg-final { scan-tree-dump-times "out of loop 1" 3 "lim2" } } */
      31  
      32