1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -fno-tree-vectorize -fpic -mtune=generic" } */
       3  /* { dg-require-effective-target fpic } */
       4  
       5  static int heap[2*(256 +1+29)+1];
       6  static int heap_len;
       7  static int heap_max;
       8  void 
       9  foo (int elems)
      10  {
      11    int n, m;
      12    int max_code = -1;
      13    int node = elems;
      14    heap_len = 0, heap_max = (2*(256 +1+29)+1);
      15    for (n = 0; n < elems; n++)
      16      heap[++heap_len] = max_code = n;
      17    do {
      18      n = heap[1];
      19      heap[1] = heap[heap_len--];
      20      m = heap[1];
      21      heap[--heap_max] = n;
      22      heap[--heap_max] = m;
      23    } while (heap_len >= 2);
      24  }
      25  
      26  /* { dg-final { scan-assembler-not "lea\[lq\]?\[ \t\]\\((%|)r\[a-z0-9\]*" } } */